adding test ioctl

Eugene Syromiatnikov esyr at
Mon Mar 2 20:32:10 UTC 2020

On Mon, Mar 02, 2020 at 10:32:04AM +0530, Bran S wrote:
> I have written a small ioctl test for microproject.
> Here:
> Next:
> 1. Edit the, where should I mention the new test ? I don't see
> all the tests in check_PROGRAMS variable. And I am not sure what it does.

It lists all the test binary targets that have to be listed explicitly.
There is also a way for implicit binary target definition,
PURE_EXECUTABLES, that is defined in the sourced,
generated from pure_executables.list (see tests/
for the reference).

> Please clarify what needs to be done in

Depends on what you are doing.  If your binary falls under "pure
executable" definition (that is, an executable without side effects that
can be run multiple times in parallel, and doesn't require specific
environment/arguments to run), then it can be listed in
pure_executable.lists, and the respective target will be added to the
PURE_EXECUTABLES variable automatically; otherwise, just add it to
check_PORGRAMS manually, so the appropriate build rule will be

> 2. Create ioctl_xyz.dir/exp

"exp" files are generated during the test run (usually, by
run_strace_match_* functions or the test itself); if you want to provide
the expected output explicitly, please take a look at the *.expected
files and the way they are handled.  However, I doubt that, judging
by the way your test case is written.

> 3. Edit

If your test can be generated (which is likely the case, unless some
specific setup is needed), that's the way to go, yes.

> Do I need to make any other changes ? or is there anything I have missed to
> mention.

tests/.gitignore should include the test binary name.

You may probably want to have a look at [1] as a possible new ioctl
implementation example.


More information about the Strace-devel mailing list