1b5b5b76b5
* tests/quotactl-success.c: New file. * tests/quotactl-success-v.c: Likewise. * tests/quotactl-xfs-success.c: Likewise. * tests/quotactl-xfs-success-v.c: Likewise. * tests/quotactl-success.test: New test. * tests/quotactl-success-v.test: Likewise. * tests/quotactl-xfs-success.test: Likewise. * tests/quotactl-xfs-success-v.test: Likewise. * tests/.gitignore: Add quotactl-success, quotactl-success-v, quotactl-xfs-success and quotactl-xfs-success-v. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add four new tests listed above. * tests/quotactl.h: [INJECT_RETVAL] (check_quota): Use errstr instead of sprintrc; check that returned value is equivalent to the injected one; append "(INJECTED)" string to errstr. * tests/quotactl.c: Changed condition rc != 0 to rc < 0 in callback functions and value of opaque pointer addr_cb_arg in order to check successful injection. * tests/quotactl-xfs.c: Likewise.
7 lines
172 B
Bash
Executable File
7 lines
172 B
Bash
Executable File
#!/bin/sh -efu
|
|
|
|
. "${srcdir=.}/scno_tampering.sh"
|
|
|
|
run_strace -v -e trace=quotactl -e inject=quotactl:retval=42 ../quotactl-xfs-success-v > "$EXP"
|
|
match_diff "$LOG" "$EXP"
|