This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Use GetWindowsInaccessibleDir() in a couple more tests
ClosedPublic

Authored by mstorsjo on Mar 11 2021, 11:45 AM.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Mar 11 2021, 11:45 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2021, 11:45 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
curdeius added inline comments.
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
114

Just thinking out loud, if you used nested_dir = dir on Windows, wouldn't that provoke permission_denied error?

mstorsjo added inline comments.Mar 11 2021, 12:02 PM
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
114

That's true, why didn't I just go with that? Updating...

mstorsjo updated this revision to Diff 330047.Mar 11 2021, 12:08 PM

Simplify the modification in temp_directory_path

curdeius accepted this revision as: curdeius.Mar 11 2021, 11:48 PM

LGTM apart from the comment.

libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
108

I'd like a small comment here about the difference on Windows, as we cannot create any file inside the inaccessible directory so we cannot test the same thing.

mstorsjo added inline comments.Mar 11 2021, 11:55 PM
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
108

Ok, amended it locally with this comment:

// We can't create files in the directory we use as inaccessible directory
// for tests on Windows, so this doesn't test exactly the same as the
// code below.
curdeius added inline comments.Mar 12 2021, 12:41 AM
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
108

+1

Ping @Mordante (who reviewed a similar patch earlier) for second approval

mstorsjo updated this revision to Diff 335606.Apr 6 2021, 11:26 AM

Amended to remove xfails and to allow the dir to be missing. Has 1 approval from earlier, but the temp_dir_path test is modified a bit differently then all the others so it might warrant another look.

ldionne accepted this revision.Apr 9 2021, 9:29 AM
This revision is now accepted and ready to land.Apr 9 2021, 9:29 AM