Commit Graph

6 Commits

Author SHA1 Message Date
7dad3f3edd tests: extend test coverage of mknod syscall
* mknod.c (main): Check more corner cases of mode_t parser.
* mknod.test: Update.
2016-04-26 11:00:51 +00:00
96a9ff5746 tests: do not include <errno.h> unnecessarily
Automatically change tests/*.c files using the following script:

for f in tests/*.c; do
	grep -Fv errno.h "$f" |
	grep -Ewq '(si_)?errno|SOCK_FILTER_DENY_SYSCALL' ||
		sed -i '/# *include *<errno\.h>/d' "$f"
done
2016-04-21 22:05:57 +00:00
d0652a40eb tests/mknod.c: print syscall() result using %ld format 2016-04-21 22:05:55 +00:00
9f6611bb31 tests: use errno2name()
Automatically change tests/*.c files using the following sed regexp:
sed -i 's/errno == E[[:alnum:]]\+ ? "E[[:alnum:]]\+" : "E[[:alnum:]]\+"/errno2name()/g'
2016-04-21 18:16:50 +00:00
9d91928320 Fix decoding of device numbers in mknod and mknodat syscalls
* mknod.c (decode_mknod): Treat device number argument as unsigned int.
* tests/mknod.c: Include <sys/sysmacros.h> or <sys/mkdev.h>
for definition of makedev macro.
(main): Add a check for a character special file.
2016-03-25 23:48:48 +00:00
Fei Jie
0ebe67b780 tests: add mknod.test
* tests/mknod.c: New file.
* tests/mknod.test: New test.
* tests/.gitignore: Add mknod.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add mknod.test.
2016-03-25 09:47:13 +00:00