26954f7753
Unify different generic PRINT_FIELD_* implementations
...
Create a new header print_fields.h and move generic PRINT_FIELD_*
macros there.
* print_fields.h: New file.
* Makefile.am (strace_SOURCES): Add it.
* netlink_sock_diag.c: Include "print_fields.h".
(PRINT_FIELD_U, PRINT_FIELD_X, PRINT_FIELD_COOKIE, PRINT_FIELD_FLAGS,
PRINT_FIELD_XVAL): Move to print_fields.h file.
* quota.c: Include "print_fields.h".
(PRINT_FIELD_D): Move to print_fields.h file.
(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
* statx.c: Include "print_fields.h".
(PRINT_FIELD_U): Remove.
(SYS_FUNC(statx)): Update PRINT_FIELD_U callers.
* tests/quotactl.h: Include "print_fields.h".
* tests/quotactl-xfs.c: Update callers of PRINT_FIELD_* macros.
* tests/quotactl.c: Likewise.
(PRINT_FIELD_D, PRINT_FIELD_U, PRINT_FIELD_X): Remove.
* tests/test_nlattr.h: Include "print_fields.h".
(PRINT_FIELD_U, PRINT_FIELD_X): Remove.
* tests/xstatx.c: Include "print_fields.h".
(PRINT_FIELD_U): Remove.
(print_stat): Update PRINT_FIELD_U callers.
* tests/tests.h [!STRACE_PRINTF] (STRACE_PRINTF): Define to printf.
2017-07-01 13:14:49 +00:00
Eugene Syromyatnikov
fd992caa81
tests: fix name spelling
2016-10-30 22:54:27 +00:00
Eugene Syromyatnikov
06c8831cf4
Fix typo in comment in tests/quotactl.h
2016-10-31 01:32:45 +03:00
Eugene Syromyatnikov
5ca0852f5f
tests: fix invalid pointer checks in quotactl test
...
* tests/quotactl.h (bogus_special, bogus_addr): Move it...
* tests/quotactl.c (main): ... here; remove static and const qualifiers,
use memory after tail_alloc instead of magic numbers.
* tests/quotactl-xfs.c (main): Likewise.
2016-10-31 00:49:29 +03:00
Eugene Syromyatnikov
d212c95b84
tests: move ARG_STR and similar macros to tests.h
...
* tests/add_key.c (_STR, ARG_STR): Move ...
* tests/tests.h: ... here.
(ARG_ULL_STR): New macro.
* tests/keyctl.c (ARG_STR): Remove.
* tests/quotactl.h (ARG_STR): Likewise.
* tests/request_key.c (ARG_STR): Likewise.
2016-10-26 04:18:34 +03:00
Eugene Syromyatnikov
06934669ea
tests: move fill_memory and fill_memory_ex into a separate file
...
* tests/fill_memory.c: New file.
* tests/Makefile.am (libtests_a_SOURCES): Add it.
* tests/quotactl.h (fill_memory, fill_memory_ex): Move to fill_memory.c.
* tests/tests.h (fill_memory, fill_memory_ex): New prototypes.
2016-10-26 01:06:09 +00:00
Eugene Syromyatnikov
ab648c804c
tests: add period parameter to fill_memory_ex
...
* tests/quotactl.h (fill_memory_ex): Add period parameter,
use it as a divisor in non-constant part of value.
(fill_memory): Specify period of 0x80 to fill_memory_ex call.
* tests/quotactl-xfs.c (main): Likewise.
2016-10-26 01:06:09 +00:00
Eugene Syromyatnikov
81b63834dd
tests: check decoding of quotactl syscall
...
* configure.ac (AC_CHECK_HEADERS): Add linux/dqblk_xfs.h, linux/quota.h,
and sys/quota.h.
* tests/.gitignore: Add quotactl, quotactl-v, quotactl-xfs,
and quotactl-xfs-v.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add quotactl.test, quotactl-v.test,
quotactl-xfs.test, and quotactl-xfs-v.test.
(EXTRA_DIST): Add quotactl.h
* quotactl.h: New file.
* quotactl.c: Likewise.
* quotactl-v.c: Likewise.
* quotactl-xfs.c: Likewise.
* quotactl-xfs-v.c: Likewise.
* quotactl.test: New test.
* quotactl-v.test: Likewise.
* quotactl-xfs.test: Likewise.
* quotactl-xfs-v.test: Likewise.
2016-09-27 08:11:06 +00:00