Phenolphthalein is an experimental concurrency test runner that:
While still quite new, inefficient, and rough against the edges, it has the following features:
SIGTERM
by returning partial resultsPhenolphthalein is written in Rust (with some C interfacing code) and licenced under the MIT licence.
You probably don't yet - it's early beta-grade software. But the intention is that it'll be useful when you want something like Litmus, but:
Using either the example test given in main.c
or your own variant thereof, do
something like:
$ clang -dynamiclib -std=c11 -pedantic -O3 -o test.dylib test.c
$ cargo run --release [OPTIONS] test.dylib
phph
accepts several arguments:
These can also be set globally using a TOML config file: pass
--dump-config-path
instead of a test file to see where phph
is looking for
one, and --dump-config
to get the current config in the right format.
--iterations=N
: run N
many iterations in total (set to 0
to disable
iteration cap)--period=N
: join and re-create threads every N
iterations
(set to 0
to disable thread rotation)--check=TYPE
: control how phenolphthalein checks states against the test's
postcondition: disable
checks entirely; report
the check outcomes per
state; or exit-on-pass
, exit-on-fail
, or exit-on-unknown
to abort the
test when a particular outcome arrives--permute=TYPE
: control the order in which phenolphthalein launches threads:
either static
or random
--sync=TYPE
: synchronise threads with a spinlock (spinner
, default) or
a full Rust barrier (barrier
); spinner
is faster and tends to show more
weak behaviour, but barrier
is perhaps 'safer'--output-type=TYPE
: control the output format, with possibilities being a
litmus7-style histogram
, or a semi-machine-readable json
serialisationAll contributions are welcome! Check the GitHub issues page for specific things that need work. General areas of development include:
Similar purpose to Litmus, but different execution. Also, the incredibly long and difficult to spell name is a conscious effort to suggest to the potential user that they should probably be using Litmus instead.