Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clangd tests fail on Windows #31943

Closed
rnk opened this issue Apr 10, 2017 · 1 comment
Closed

clangd tests fail on Windows #31943

rnk opened this issue Apr 10, 2017 · 1 comment
Labels
bugzilla Issues migrated from bugzilla clang-tools-extra

Comments

@rnk
Copy link
Collaborator

rnk commented Apr 10, 2017

Bugzilla Link 32596
Resolution FIXED
Resolved on Apr 10, 2017 10:15
Version unspecified
OS Windows NT
CC @d0k

Extended Description

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":[

     ^

:1:1: note: scanning from here
Content-Length: 424
^
: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 "}]}

     ^

: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'"}]}}

     ^

: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"}]}}

     ^

:1:1: note: scanning from here
Content-Length: 424
^

error: command failed with exit status: 1

--

@rnk
Copy link
Collaborator Author

rnk commented Apr 10, 2017

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.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang-tools-extra
Projects
None yet
Development

No branches or pull requests

1 participant