Re: [PATCH] Makefile.am: use readlink as a fallback for realpath

2016-09-01 Thread Dmitry V. Levin
On Thu, Sep 01, 2016 at 02:47:34AM +0300, Eugene Syromyatnikov wrote: > Since realpath utility is fairly new in GNU coreutils, there could be > possibility that it is not present in the system. Instead of checking > its presence in configure script it probably makes sense to resort to > calling rea

Re: [PATCH 1/2] readahead: Fix print format for the "count" argument

2016-09-01 Thread Dmitry V. Levin
On Thu, Sep 01, 2016 at 02:42:48AM +0300, Eugene Syromyatnikov wrote: > It is size_t (according to documentation and syscalls.h), so "%lu" should > be used instead of "%ld". > > * readahead.c (SYS_FUNC(readahead)): fix conversion specifier for the > "count" argument. > --- > readahead.c |2

Re: [PATCH 2/2] tests: check decoding of readahead syscall

2016-09-01 Thread Dmitry V. Levin
On Thu, Sep 01, 2016 at 02:43:30AM +0300, Eugene Syromyatnikov wrote: > * tests/readahead.c: New file. > * tests/readahead.test: New test. > * tests/.gitignore: Add readahead. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (DECODER_TESTS): Add readahead.test. > --- > Simple test for simple d

Re: [PATCH] Makefile.am: use readlink as a fallback for realpath

2016-09-01 Thread Eugene Syromyatnikov
On Thu, Sep 1, 2016 at 9:35 AM, Dmitry V. Levin wrote: > On Thu, Sep 01, 2016 at 02:47:34AM +0300, Eugene Syromyatnikov wrote: >> Since realpath utility is fairly new in GNU coreutils, there could be >> possibility that it is not present in the system. Instead of checking >> its presence in config

Re: [PATCH 2/2] tests: check decoding of readahead syscall

2016-09-01 Thread Eugene Syromyatnikov
On Thu, Sep 1, 2016 at 9:39 AM, Dmitry V. Levin wrote: > On Thu, Sep 01, 2016 at 02:43:30AM +0300, Eugene Syromyatnikov wrote: >> * tests/readahead.c: New file. >> * tests/readahead.test: New test. >> * tests/.gitignore: Add readahead. >> * tests/Makefile.am (check_PROGRAMS): Likewise. >> (DECOD

[PATCH 0/5] tests: Refactor of retstr from futex.c into a library function and updated readahead test

2016-09-01 Thread Eugene Syromyatnikov
Hello. In accordance with Dmitry's suggestion, readahead test now supports the case when call returns 0. In order to do so, I decided to move function for printing return code from the futex test to libtests. The update of count argument format specifier in readahed syscall is out of scope of this

[PATCH 2/5] tests/futex: Increase static sprintrc buffer size

2016-09-01 Thread Eugene Syromyatnikov
* tests/futex.c (sprintrc) : Value increased from 256 to 4095. --- tests/futex.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/futex.c b/tests/futex.c index dca191e..edb5c9d 100644 --- a/tests/futex.c +++ b/tests/futex.c @@ -145,7 +145,7 @@ void invalid_op(int *val

[PATCH 1/5] tests/futex: Rename retstr to sprintrc

2016-09-01 Thread Eugene Syromyatnikov
* tests/futex.c (retstr): Rename to sprintrc, (main): Update all retstr calls to sprintrc. --- tests/futex.c | 88 + 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/tests/futex.c b/tests/futex.c index dfdf68d..dca191e 1006

[PATCH 3/5] tests/futex: Add support for return codes other than 0 and -1 to sprintrc

2016-09-01 Thread Eugene Syromyatnikov
* tests/futex.c (sprintrc): Print the actual return code provided, not just "0". --- tests/futex.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/futex.c b/tests/futex.c index edb5c9d..fb7833c 100644 --- a/tests/futex.c +++ b/tests/futex.c @@ -147,11 +1

[PATCH 4/5] tests: Move return code printing into a separate file

2016-09-01 Thread Eugene Syromyatnikov
* tests/tests.h: Add sprintrc declaration. * tests/futex.c (sprintrc): Remove. * tests/sprintrc.c: New file. * tests/Makefile.am (libtests_a_SOURCES): Add sprintrc.c. --- tests/Makefile.am |1 + tests/futex.c | 24 tests/sprintrc.c | 36 +++

[PATCH 5/5] tests: check decoding of readahead syscall

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