pjdfstest is a test suite that helps exercise POSIX system calls.
cd rust
cargo run
The documentation is available at https://saidsay-so.github.io/pjdfstest/.
_pjdfstest [OPTIONS] [--] TEST_PATTERNS
_
-h, --help
- Print help message-c, --configuration-file CONFIGURATION-FILE
- Path of the configuration file-l, --list-features
- List opt-in features-e, --exact
- Match names exactly-v, --verbose
- Verbose mode-p, --path PATH
- Path where the test suite will be executed[--] TEST_PATTERNS
- Filter tests which match against the provided patternsExample: pjdfstest -c pjdfstest.toml chmod
It is possible to filter which tests should be ran, by specifying which parts should match. Tests are usually identified by syscall and optionally the file type on which it operates.
The test suite can be ran without privileges. However, not all tests can be completed without privileges, therefore the coverage will be incomplete. For example, tests which need to switch users will not be run.
The test suite needs dummy users and groups to be set up. This should be handled automatically when installing it via a package, but they need to be created otherwise. By default, the users (with the same name for the group associated to each of them) to create are:
It is also possible to specify other users with the configuration file.
cat <<EOF | adduser -w none -S -f -
pjdfstest::::::Dummy User for pjdfstest:/nonexistent:/sbin/nologin:
EOF
cat <<EOF | newusers
tests:x:::Dummy User for pjdfstest:/:/usr/bin/nologin
pjdfstest:x:::Dummy User for pjdfstest:/:/usr/bin/nologin
EOF