Skip to content

Commit

Permalink
docs: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsay-so committed Sep 21, 2024
1 parent a853a74 commit 692c2b2
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ pjdfstest is a test suite that helps exercise POSIX system calls.

## Build

### Requirements

The following dependencies are required to build the project:

#### Common

- Rust (1.72.1 or later)

#### Linux

- libacl1-dev (Debian/Ubuntu), libacl-devel (Fedora), acl (Arch)
- acl

```bash
cd rust
cargo run
Expand All @@ -13,6 +26,51 @@ cargo run

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

## Configuration file

A TOML configuration file can be used to specify parameters for the test suite.
A default configuration file is provided in the repository, which can be used as a template.

```toml
# Configuration for the pjdfstest runner

# This section allows enabling file system specific features.
# Please see the book for more details.
# A list of these features is provided when executing the runner with `-l`.
[features]
# File flags can be specified for OS which supports them.
# file_flags = ["UF_IMMUTABLE"]

# Here is an example with the `posix_fallocate` syscall.
posix_fallocate = {}

# Might use the key notation as well.
# [features.posix_fallocate]

[settings]
# naptime is the duration of various short sleeps. It should be greater than
# the timestamp granularity of the file system under test.
naptime = 0.001
# Allow to run the EROFS tests, which require to remount the file system on which
# pjdsfstest is run as read-only.
allow_remount = false

# This section allows to modify the mechanism for switching users, which is required by some tests.
# [dummy_auth]
# An entry is the name of a user and its associated group.
# For now, the array requires exactly 3 entries.
# Please see the book for more details.
# entries = [
# ["nobody", "nobody"],
# nogroup instead for some Linux distros
# ["nobody", "nogroup"],
# ["tests", "tests"],
# ["pjdfstest", "pjdfstest"],
# ]
```

Please refer to the [documentation](https://saidsay-so.github.io/pjdfstest/configuration-file.html) for more details.

## Command-line interface

_`pjdfstest [OPTIONS] [--] TEST_PATTERNS`_
Expand Down Expand Up @@ -70,3 +128,9 @@ tests:x:::Dummy User for pjdfstest:/:/usr/bin/nologin
pjdfstest:x:::Dummy User for pjdfstest:/:/usr/bin/nologin
EOF
```

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on the process for submitting pull requests to us
and the process for adding new tests.
Also, read the [documentation](https://saidsay-so.github.io/pjdfstest/test-declaration.html) on how to declare tests.
2 changes: 1 addition & 1 deletion book/src/test-declaration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn update_ctime(ctx: &mut TestContext, f_type: FileType) {

All the structures and functions needed are documented in the `pjdfstest` crate,
which you can obtain by running `cargo doc --open` in the `rust` directory
or by visiting the [documentation](/doc/pjdfstest).
or by visiting the [documentation](doc/pjdfstest/).

## Test context

Expand Down

0 comments on commit 692c2b2

Please sign in to comment.