This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Disable a test regarding error behaviour for excessively long paths on windows
ClosedPublic

Authored by mstorsjo on Mar 7 2021, 2:21 AM.

Details

Summary

Checking for the existence of an invalidly long path name isn't
an error in itself on windows.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Mar 7 2021, 2:21 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2021, 2:21 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
mstorsjo updated this revision to Diff 328874.Mar 7 2021, 8:42 AM

Reupload, rebased closer to main to hopefully fix patch application

Quuxplusone added inline comments.
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?

mstorsjo added inline comments.Mar 7 2021, 9:35 AM
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.

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?

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.)

curdeius accepted this revision as: curdeius.EditedMar 7 2021, 1:03 PM

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.

Ping for second approval

Mordante accepted this revision.Mar 11 2021, 10:04 AM
Mordante added a subscriber: Mordante.

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/

This revision is now accepted and ready to land.Mar 11 2021, 10:04 AM

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.

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.

This revision was landed with ongoing or failed builds.Mar 11 2021, 10:22 AM
This revision was automatically updated to reflect the committed changes.