strace/test
Dmitry V. Levin d6c71dd061 Fix preprocessor indentation
Indent the C preprocessor directives to reflect their nesting
using the following script:

$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do
	cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done
2018-12-30 15:35:21 +00:00
..
.gitignore test: remove fork.c and vfork.c 2015-12-30 23:28:35 +00:00
childthread.c Whitespace cleanups. no code changes. 2011-06-07 12:13:24 +02:00
clone.c Fix a few spacing style issues 2017-06-17 22:54:08 +00:00
leaderkill.c Whitespace cleanups. no code changes. 2011-06-07 12:13:24 +02:00
Makefile test: remove fork.c and vfork.c 2015-12-30 23:28:35 +00:00
many_looping_threads.c New test: test/many_looping_threads.c 2015-03-21 20:59:39 +01:00
mmap_offset_decode.c Fix function prototypes with unspecified arguments 2017-06-17 20:49:09 +00:00
mtd.c Fix function prototypes with unspecified arguments 2017-06-17 20:49:09 +00:00
procpollable.c Improve code readability by avoiding assignments inside if() 2011-08-23 12:53:01 +02:00
README.md test: rename README to README.md 2017-03-19 13:34:16 +00:00
seccomp.c Fix a few spacing style issues 2017-06-17 22:54:08 +00:00
sfd.c test/sfd.c: add missing includes 2015-02-20 13:21:40 +00:00
sig.c Fix function prototypes with unspecified arguments 2017-06-17 20:49:09 +00:00
sigkill_rain.c test: include headers for used funcs 2013-05-02 22:41:50 +00:00
skodic.c Fix preprocessor indentation 2018-12-30 15:35:21 +00:00
threaded_execve.c Fix preprocessor indentation 2018-12-30 15:35:21 +00:00
ubi.c Fix function prototypes with unspecified arguments 2017-06-17 20:49:09 +00:00
wait_must_be_interruptible.c Fix function prototypes with unspecified arguments 2017-06-17 20:49:09 +00:00
x32_lseek.c Use <asm/unistd.h> instead of <sys/syscall.h> 2016-08-09 14:38:29 +00:00
x32_mmap.c Use <asm/unistd.h> instead of <sys/syscall.h> 2016-08-09 14:38:29 +00:00

This directory contains some corner case demo files. Most of them are quite old and probably will be of little interest to the casual reader. For automated tests, see ../tests directory.

To run a demo:

  • Run make
  • Run resulting executable(s) under strace
  • Check strace output and/or program's output and exitcode

To add a new demo:

  • Add its .c source to this dir
  • Add it to "all" and "clean" targets in Makefile
  • Add it to .gitignore file

Please spend some time making your demo understandable. For example, it may print an explanation how it should be used (which strace options to use, and what to look for in strace output).

If possible, make it so that your demo detects error/bug it is intended to demonstrate, and prints error message and exits with 1 if the bug is detected, instead of relying on user to peruse strace output.