llvm / llvm/llvm-project

Incorrect filesystem test in libcxx

Open
#161,475 0 comments 0 reactions 0 assignees View on GitHub
filesystem libc++ test-suite
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

The test set_to_empty here https://github.com/llvm/llvm-project/blob/a414c22f32fa08ab91d9d6fe06d6949b526bedb3/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp#L94 checks if an error is returned for empty path as input to current path. Current path might use chdir and as per posix the behavior for this case is implementation specific. One way to handle empty string to chdir is ignoring the request. The test failed on a proprietary target os that handles empty string input in the latter manner.
Is there a reason for why an error is expected in the test case?
If not, can we change this?

Contributor guide

Open the contributing guide

Research direction

Start with libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp, especially the set_to_empty test around line 94. Check the POSIX behavior described for an empty path and the existing test expectation; done means the test no longer rejects a conforming implementation-specific behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.