LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 32596 - clangd tests fail on Windows
Summary: clangd tests fail on Windows
Status: RESOLVED FIXED
Alias: None
Product: clang-tools-extra
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-10 09:52 PDT by Reid Kleckner
Modified: 2017-04-10 10:15 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Kleckner 2017-04-10 09:52:58 PDT
These tests fail on Windows:
Failing Tests (4):
    Clang Tools :: clangd/completion.test
    Clang Tools :: clangd/diagnostics.test
    Clang Tools :: clangd/fixits.test
    Clang Tools :: clangd/formatting.test

I will XFAIL them and reference this PR.




Here's the complete lit output:
--------------------------------------


FAIL: Clang Tools :: clangd/completion.test (268 of 613)
******************** TEST 'Clang Tools :: clangd/completion.test' FAILED ********************
Script:
--
clangd -run-synchronously < C:\src\llvm-project\clang-tools-extra\test\clangd\completion.test | FileCheck C:\src\llvm-project\clang-tools-extra\test\clangd\completion.test
--
Exit Code: 1

Command Output (stdout):
--
$ "clangd" "-run-synchronously"
# command stderr:
<-- {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
--> {"jsonrpc":"2.0","id":0,"result":{"capabilities":{
          "textDocumentSync": 1,
          "documentFormattingProvider": true,
          "documentRangeFormattingProvider": true,
          "documentOnTypeFormattingProvider": {"firstTriggerCharacter":"}","moreTriggerCharacter":[]},
          "codeActionProvider": true,
          "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">"]}
        }}}
<-- {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///main.cpp","languageId":"cpp","version":1,"text":"struct fake { int a, bb, ccc; };\nint main() {\n  fake f;\n  f.\n}\n"}}}
Assertion failed: path::is_absolute(File) && "path must be absolute", file C:\src\llvm-project\clang-tools-extra\clangd\ASTManager.cpp, line 235

error: command failed with exit status: 0xc0000409
$ "FileCheck" "C:\src\llvm-project\clang-tools-extra\test\clangd\completion.test"
# command stderr:
C:\src\llvm-project\clang-tools-extra\test\clangd\completion.test:18:10: error: expected string not found in input
# CHECK: {"jsonrpc":"2.0","id":1,"result":[
         ^
<stdin>:1:1: note: scanning from here
Content-Length: 424
^
<stdin>:3:1: note: possible intended match here
{"jsonrpc":"2.0","id":0,"result":{"capabilities":{
^

error: command failed with exit status: 1

--

********************
Testing: 0 .. 10.. 20.. 30.. 40
FAIL: Clang Tools :: clangd/formatting.test (270 of 613)
******************** TEST 'Clang Tools :: clangd/formatting.test' FAILED ********************
Script:
--
clangd < C:\src\llvm-project\clang-tools-extra\test\clangd\formatting.test | FileCheck C:\src\llvm-project\clang-tools-extra\test\clangd\formatting.test
--
Exit Code: 1

Command Output (stdout):
--
$ "clangd"
# command stderr:
<-- {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
--> {"jsonrpc":"2.0","id":0,"result":{"capabilities":{
          "textDocumentSync": 1,
          "documentFormattingProvider": true,
          "documentRangeFormattingProvider": true,
          "documentOnTypeFormattingProvider": {"firstTriggerCharacter":"}","moreTriggerCharacter":[]},
          "codeActionProvider": true,
          "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">"]}
        }}}
<-- {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///foo.c","languageId":"c","version":1,"text":"int foo ( int x ) {\n    x = x+1;\n    return x;\n    }"}}}
<-- {"jsonrpc":"2.0","id":1,"method":"textDocument/rangeFormatting","params":{"textDocument":{"uri":"file:///foo.c"},"range":{"start":{"line":1,"character":4},"end":{"line":1,"character":12}},"options":{"tabSize":4,"insertSpaces":true}}}
Assertion failed: path::is_absolute(File) && "path must be absolute", file C:\src\llvm-project\clang-tools-extra\clangd\ASTManager.cpp, line 235

error: command failed with exit status: 0xc0000409
$ "FileCheck" "C:\src\llvm-project\clang-tools-extra\test\clangd\formatting.test"
# command stderr:
C:\src\llvm-project\clang-tools-extra\test\clangd\formatting.test:25:10: error: expected string not found in input
# CHECK: {"jsonrpc":"2.0","id":1,"result":[{"range": {"start": {"line": 0, "character": 19}, "end": {"line": 1, "character": 4}}, "newText": "\n "},{"range": {"start": {"line": 1, "character": 9}, "end": {"line": 1, "character": 9}}, "newText": " "},{"range": {"start": {"line": 1, "character": 10}, "end": {"line": 1, "character": 10}}, "newText": " "},{"range": {"start": {"line": 1, "character": 12}, "end": {"line": 2, "character": 4}}, "newText": "\n "}]}
         ^
<stdin>:10:5: note: scanning from here
 }}}
    ^

error: command failed with exit status: 1

--

********************
Testing: 0 .. 10.. 20.. 30.. 40
FAIL: Clang Tools :: clangd/diagnostics.test (272 of 613)
******************** TEST 'Clang Tools :: clangd/diagnostics.test' FAILED ********************
Script:
--
clangd -run-synchronously < C:\src\llvm-project\clang-tools-extra\test\clangd\diagnostics.test | FileCheck C:\src\llvm-project\clang-tools-extra\test\clangd\diagnostics.test
--
Exit Code: 1

Command Output (stdout):
--
$ "clangd" "-run-synchronously"
# command stderr:
<-- {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
--> {"jsonrpc":"2.0","id":0,"result":{"capabilities":{
          "textDocumentSync": 1,
          "documentFormattingProvider": true,
          "documentRangeFormattingProvider": true,
          "documentOnTypeFormattingProvider": {"firstTriggerCharacter":"}","moreTriggerCharacter":[]},
          "codeActionProvider": true,
          "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">"]}
        }}}
<-- {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///foo.c","languageId":"c","version":1,"text":"void main() {}"}}}
Assertion failed: path::is_absolute(File) && "path must be absolute", file C:\src\llvm-project\clang-tools-extra\clangd\ASTManager.cpp, line 235

error: command failed with exit status: 0xc0000409
$ "FileCheck" "C:\src\llvm-project\clang-tools-extra\test\clangd\diagnostics.test"
# command stderr:
C:\src\llvm-project\clang-tools-extra\test\clangd\diagnostics.test:12:10: error: expected string not found in input
# CHECK: {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///foo.c","diagnostics":[{"range":{"start": {"line": 0, "character": 1}, "end": {"line": 0, "character": 1}},"severity":2,"message":"return type of 'main' is not 'int'"},{"range":{"start": {"line": 0, "character": 1}, "end": {"line": 0, "character": 1}},"severity":3,"message":"change return type to 'int'"}]}}
         ^
<stdin>:1:1: note: scanning from here
Content-Length: 424
^

error: command failed with exit status: 1

--

********************
Testing: 0 .. 10.. 20.. 30.. 40
FAIL: Clang Tools :: clangd/fixits.test (275 of 613)
******************** TEST 'Clang Tools :: clangd/fixits.test' FAILED ********************
Script:
--
clangd -run-synchronously < C:\src\llvm-project\clang-tools-extra\test\clangd\fixits.test | FileCheck C:\src\llvm-project\clang-tools-extra\test\clangd\fixits.test
--
Exit Code: 1

Command Output (stdout):
--
$ "clangd" "-run-synchronously"
# command stderr:
<-- {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
--> {"jsonrpc":"2.0","id":0,"result":{"capabilities":{
          "textDocumentSync": 1,
          "documentFormattingProvider": true,
          "documentRangeFormattingProvider": true,
          "documentOnTypeFormattingProvider": {"firstTriggerCharacter":"}","moreTriggerCharacter":[]},
          "codeActionProvider": true,
          "completionProvider": {"resolveProvider": false, "triggerCharacters": [".",">"]}
        }}}
<-- {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///foo.c","languageId":"c","version":1,"text":"int main(int i, char **a) { if (i = 2) {}}"}}}
Assertion failed: path::is_absolute(File) && "path must be absolute", file C:\src\llvm-project\clang-tools-extra\clangd\ASTManager.cpp, line 235

error: command failed with exit status: 0xc0000409
$ "FileCheck" "C:\src\llvm-project\clang-tools-extra\test\clangd\fixits.test"
# command stderr:
C:\src\llvm-project\clang-tools-extra\test\clangd\fixits.test:12:10: error: expected string not found in input
# CHECK: {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///foo.c","diagnostics":[{"range":{"start": {"line": 0, "character": 35}, "end": {"line": 0, "character": 35}},"severity":2,"message":"using the result of an assignment as a condition without parentheses"},{"range":{"start": {"line": 0, "character": 35}, "end": {"line": 0, "character": 35}},"severity":3,"message":"place parentheses around the assignment to silence this warning"},{"range":{"start": {"line": 0, "character": 35}, "end": {"line": 0, "character": 35}},"severity":3,"message":"use '==' to turn this assignment into an equality comparison"}]}}
         ^
<stdin>:1:1: note: scanning from here
Content-Length: 424
^

error: command failed with exit status: 1

--
Comment 1 Reid Kleckner 2017-04-10 10:15:34 PDT
This was caused by r299843.

Figuring out the correct XFAIL condition was hard. It was easier to fix the assertion, which I did in r299854.