[PATCH 01/11] tests: Additional getcwd checks

2016-09-21 Thread Eugene Syromyatnikov
* tests/getcwd.c: Additional checks for getcwd arguments decoding. --- tests/getcwd.c |8 1 file changed, 8 insertions(+) diff --git a/tests/getcwd.c b/tests/getcwd.c index 704a315..e4a791f 100644 --- a/tests/getcwd.c +++ b/tests/getcwd.c @@ -13,6 +13,14 @@ main(void) {

[PATCH 00/11] Various minor tests

2016-09-21 Thread Eugene Syromyatnikov
Hello. This patchset provides a set of some simple syscall decoders test along with fixes of minor issues discovered in the process. Eugene Syromyatnikov (11): tests: Additional getcwd checks tests: Avoid filling with the same values in ioctl_block test tests: check decoding of getcpu

[PATCH 03/11] tests: check decoding of getcpu syscall

2016-09-21 Thread Eugene Syromyatnikov
* tests/getcpu.c: New file. * tests/getcpu.test: New test. * tests/.gitignore: Add getcpu. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add getcpu.test. --- tests/.gitignore |1 + tests/Makefile.am |2 ++ tests/getcpu.c| 48

[PATCH 02/11] tests: Avoid filling with the same values in ioctl_block test

2016-09-21 Thread Eugene Syromyatnikov
* tests/ioctl.block (init_magic): Add iterator value to fill magic value in order to enable detection of possible 4-byte aligned shifts. --- tests/ioctl_block.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ioctl_block.c b/tests/ioctl_block.c index

[PATCH 11/11] tests: Add test for decoding fadvise syscall

2016-09-21 Thread Eugene Syromyatnikov
* tests/.gitignore: Add fadvise64, fadvise64_64. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add fadvise64.test, fadvise64_64.test. * fadvise64.c: New file. * fadvise64_64.c: Likewise. * fadvise64.test: Likewise. * fadvise64_64.test: Likewise. --- tests/.gitignore|

[PATCH 04/11] xlat: Add values for falloc_flags constants

2016-09-21 Thread Eugene Syromyatnikov
In order to avoid dependence of declared constants to headers available on build system. * xlat/falloc_flags.in: Add values for constants. --- xlat/falloc_flags.in | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xlat/falloc_flags.in b/xlat/falloc_flags.in index

[PATCH 05/11] fallocate: Change print format of offset and len arguments to signed

2016-09-21 Thread Eugene Syromyatnikov
Since types of these arguments is off_t and kernel actually expects signed values (in order to fail in case negative values are provided), it is reasonable to display these values as signed as well. * fallocate.c (SYS_FUNC(fallocate)): Change conversion specifier for printing "offset" and "len"

[PATCH 10/11] tests: Add test for decoding fallocate syscall

2016-09-21 Thread Eugene Syromyatnikov
* tests/.gitignore: Add fallocate. * tests/Makefile.am (check_PROGRAMS): Likewise. (DECODER_TESTS): Add fallocate.test. * fallocate.c: New file. * fallocate.test: Likewise. --- configure.ac |1 + tests/.gitignore |1 + tests/Makefile.am|2 ++ tests/fallocate.c|

[PATCH 07/11] util: Add getarg_ull/getarg_ll functions

2016-09-21 Thread Eugene Syromyatnikov
These allow retrieving specific argument in full taking into account peculiarities of runtimes which employ EXT_ARG (x32, for example). * defs.h: Add declarations of getarg_ull, getarg_ll. * util.c (getarg_ull): New function. (getarg_ll): Likewise. (printargs): Use getarg_ull for argument

[PATCH 08/11] fadvise: Use getarg_ull for obtaining len argument of fadvise64 syscall

2016-09-21 Thread Eugene Syromyatnikov
Since it is size_t, it is 64-bit wide on x32 and special care should be made in order to obtain it. * fadvise.c (SYS_FUNC(fadvise64)): Use getarg_ull for obtaining value of the "len" syscall argument. --- fadvise.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 06/11] fadvise: Change printing of len argument to unsigned in fadvise64 syscall

2016-09-21 Thread Eugene Syromyatnikov
long sys_fadvise64(int fd, loff_t offset, size_t len, int advice); * fadvise.c (SYS_FUNC(fadvise64)): change conversion specifier from "%ld" to "%lu" for printing len argument since kernel expects argument of type size_t. --- fadvise.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)