saidsay-so / pjdfstest

File system test suite.
https://saidsay-so.github.io/pjdfstest/
Other
7 stars 1 forks source link

pjdfstest - Rust rewrite

pjdfstest is a test suite that helps exercise POSIX system calls.

Build

cd rust
cargo run

Documentation

The documentation is available at https://saidsay-so.github.io/pjdfstest/.

Command-line interface

_pjdfstest [OPTIONS] [--] TEST_PATTERNS_

Example: pjdfstest -c pjdfstest.toml chmod

Filter tests

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.

Rootless running

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.

Dummy users/groups

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.

Create users

FreeBSD

cat <<EOF | adduser -w none -S -f -
pjdfstest::::::Dummy User for pjdfstest:/nonexistent:/sbin/nologin:
EOF

Linux

cat <<EOF | newusers
tests:x:::Dummy User for pjdfstest:/:/usr/bin/nologin
pjdfstest:x:::Dummy User for pjdfstest:/:/usr/bin/nologin
EOF