[PATCH v2 9/9] tests: Additional IPC checks

2016-09-08 Thread Eugene Syromyatnikov
* tests/ipc_msg.c: Additional msgget (parameter format), msgctl (parameter format, decoding of struct msqid_ds in IPC_SET/IPC_STAT commands) checks. * tests/ipc_sem.c: Additional semget, semctl checks. * tests/ipc_shm.c: Additional shmget, shmctl checks. * tests/semop.c: Additional semop checks

[PATCH v2 8/9] tests: Additional sched_getattr/sched_setattr decoder checks

2016-09-08 Thread Eugene Syromyatnikov
* tests/sched_xetattr.c: Additional checs for sched_getattr and sched_setattr decoding. --- tests/sched_xetattr.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tests/sched_xetattr.c b/tests/sched_xetattr.c index 9ff8c72..ce5c417 100644 --- a/t

[PATCH v2 6/9] tests: Change type of sched_nice field to signed in sched_xetattr test

2016-09-08 Thread Eugene Syromyatnikov
Kernel headers declare this field as s32, and strace prints it with %d specifier. * tests/sched_xetattr.c: Change type of sched_nice field of struct sched_attr to int32_t, update format specifiers accordingly. --- tests/sched_xetattr.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v2 3/9] tests: Split long lines in sched_xetattr test

2016-09-08 Thread Eugene Syromyatnikov
--- tests/sched_xetattr.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/sched_xetattr.c b/tests/sched_xetattr.c index b437b04..b982cca 100644 --- a/tests/sched_xetattr.c +++ b/tests/sched_xetattr.c @@ -54,7 +54,10 @@ main(void) if (syscall(__NR_sche

[PATCH v2 4/9] tests: Perform more strict structure allocation in sched_xetattr test

2016-09-08 Thread Eugene Syromyatnikov
tail_alloc with precise size of the structure is used now. * tests/sched_xetattr.c: Eliminate usage of anonymous union type; rename sched to sched_attr; change type of sched_attr to struct pointer; use tail_alloc for sched_attr allocation; update printf statements accrodingly. --- tests/sch

[PATCH v2 7/9] tests: Print size argument of sched_setattr as unsigned

2016-09-08 Thread Eugene Syromyatnikov
Since it is how it is declared. * tests/sched_xetattr.c: Cast size of struct sched_attr to unsigned, update format specifier accordingly. --- tests/sched_xetattr.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sched_xetattr.c b/tests/sched_xetattr.c index 2e0c

[PATCH v2 5/9] tests: Add sprintrc_grep function

2016-09-08 Thread Eugene Syromyatnikov
sprintrc_grep function is sprintrc function equivalent suitable for tests where grep-base pattern matching is employed. * tests/sprintrc.c (enum sprintrc_fmt): New sprintrc format enumeration. (sprintrc_ex): New function, renamed from sprintrc with updates regarding support of different format

[PATCH v2 0/9] Minor tests tweaks pt. 2 + Additional checks for IPC tests

2016-09-08 Thread Eugene Syromyatnikov
Changes since v1: * Commits "tests: Additional IPC checks" and "tests: Additional shmget decoder checks" have been merged. * Added fix for key_t printing. * Commits in tests now after commits in sources. * Sane semcnt provided now in semop/semitimedop struct sembuf decoding checks. * Inv

[PATCH v2 2/9] Fix key_t argument printing in IPC *get calls

2016-09-08 Thread Eugene Syromyatnikov
key_t is actually int. * ipc_msg.c (SYS_FUNC(msgget)): Change format specifier of the first argument to "%#x". * ipc_sem.c (SYS_FUNC(semget)): Likewise. * ipc_shm (SYS_FUNC(shmget)): Likewise. --- ipc_msg.c |5 +++-- ipc_sem.c |5 +++-- ipc_shm.c |5 +++-- 3 files changed, 9 inserti

[PATCH v2 1/9] Change type of the format specifier from "%lu" to "%d" for IPC ID

2016-09-08 Thread Eugene Syromyatnikov
* ipc_msgctl.c (SYS_FUNC(msgctl)): Convert format specifier of the first argument from "%lu" to "%d", cast argument to int. * ipc_sem.c (SYS_FUNC(semop)): Likewise. (SYS_FUNC(semtimedop)): Likewise. (SYS_FUNC(semget)): Likewise. * ipc_shm.c (SYS_FUNC(shmat)): Likewise. * ipc_shmctl.c (SYS_FUN

Re: [PATCH 1/2] tests: Additional IPC checks

2016-09-08 Thread Dmitry V. Levin
On Wed, Sep 07, 2016 at 03:41:01PM +0300, Eugene Syromyatnikov wrote: [...] > + assert(semctl(0xfdb97531, 0xeca86420, 0xdeadbeef, > + (unsigned long) 0xbadc0dedfacef00dULL) == -1); > + printf("semctl\\(%d, %d, (IPC_64\\|)?%#x /\\* SEM_\\?\\?\\? \\*/, " > + "\\[?%#lx\

Re: [PATCH 1/2] tests: Additional IPC checks

2016-09-08 Thread Dmitry V. Levin
On Wed, Sep 07, 2016 at 03:41:01PM +0300, Eugene Syromyatnikov wrote: [...] > diff --git a/tests/ipc_shm.c b/tests/ipc_shm.c > index 80a8f0f..c2c1b26 100644 > --- a/tests/ipc_shm.c > +++ b/tests/ipc_shm.c > @@ -49,8 +49,11 @@ cleanup(void) > int > main(void) > { > - static const key_t bogus_

Re: [PATCH 4/7] tests: Additional shmget decoder checks

2016-09-08 Thread Dmitry V. Levin
On Tue, Sep 06, 2016 at 05:08:36AM +0300, Eugene Syromyatnikov wrote: > * tests/ipc_shm.c: Additional checks for shmget syscall decoding. > --- > tests/ipc_shm.c | 20 > 1 file changed, 20 insertions(+) > > diff --git a/tests/ipc_shm.c b/tests/ipc_shm.c > index 54723e2..80a