Checking for the existence of an invalidly long path name isn't
an error in itself on windows.
Details
- Reviewers
curdeius Mordante - Group Reviewers
Restricted Project - Commits
- rG8ba05e14897e: [libcxx] [test] Disable a test regarding error behaviour for excessively long…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp | ||
---|---|---|
89 | /existance/existence/ Do you have any idea why line 85 does TEST_CHECK_THROW, but none of the other test cases in this file do? |
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp | ||
---|---|---|
89 | Will fix the typo. No idea, either just random inconsistency, or whoever wrote it thought it was enough to test both error reporting paths in one place, and assume it's enough to test either of them in other cases. |
I don't understand why this test fails on Windows. The length of the path should have nothing to do here, the file doesn't exist even if we suppose that the filename gets truncated to 256 characters.
It sounds like some subjacent issue, no?
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp | ||
---|---|---|
89 | I think we miss in lots of places the tests of throwing versions. |
No, it's not about whether the file exists or not - when we have bool exists(path, error_code&), a normal nonexistent file doesn't flag any error, and returns false - but this test expects the error code to be set. So its line 94 originally or 97 in the patched version, that fails on windows. (And I don't think there's much need in keeping the rest of this test and just ifdef out that single line, as we have other tests for nonexistent files above.)
OK. Thanks for making it clear. Indeed it's ok to ifdef the whole test as we have others. I had misunderstood your comment in the code. LGTM.
I see a build failure, I expect it to be a flacky failure. Can you either rerun the CI or keep an eye out after landing.
LGTM with a minor nit.
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp | ||
---|---|---|
89 | s/invalidly/invalid/ |
As it's just adding an ifdef, I'd guess it's just a spurious unrelated error, but I'll keep an eye out.
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.exists/exists.pass.cpp | ||
---|---|---|
89 | Thanks, will fix. |
/existance/existence/
Do you have any idea why line 85 does TEST_CHECK_THROW, but none of the other test cases in this file do?