You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
(16) |
Apr
(25) |
May
(8) |
Jun
(22) |
Jul
(71) |
Aug
(36) |
Sep
(22) |
Oct
(31) |
Nov
(88) |
Dec
(40) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(128) |
Feb
(35) |
Mar
(28) |
Apr
(33) |
May
(18) |
Jun
(8) |
Jul
(21) |
Aug
(18) |
Sep
(6) |
Oct
(19) |
Nov
(12) |
Dec
(44) |
2012 |
Jan
(31) |
Feb
(48) |
Mar
(31) |
Apr
(11) |
May
(13) |
Jun
(15) |
Jul
(13) |
Aug
(18) |
Sep
(7) |
Oct
(25) |
Nov
(21) |
Dec
(13) |
2013 |
Jan
(17) |
Feb
(18) |
Mar
(21) |
Apr
(35) |
May
(30) |
Jun
(4) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(30) |
Nov
(13) |
Dec
|
From: Cyril H. <su...@li...> - 2013-04-22 02:21:33
|
The branch, master, has been updated via 41f5eb7679e7847cef987e7dc7c37d47a1403b26 (commit) via b379380c698dc58fb9aa403c6bca0bd735e3c2e8 (commit) via 5307e933978c97d7c929ef2208ef19fef0ddfa0d (commit) from 5f070bc21e68409a106b2fcb1c48f574f2d3ee09 (commit) - Log ----------------------------------------------------------------- commit 41f5eb7679e7847cef987e7dc7c37d47a1403b26 Author: DAN LI <li...@cn...> Date: Fri Apr 19 11:36:46 2013 +0800 syscalls/adjtimex01.c: Test for mode ADJ_OFFSET_SINGLESHOT Additional test for mode ADJ_OFFSET_SINGLESHOT. Signed-off-by: DAN LI <li...@cn...> Reviewed-by: Wanlong Gao <gao...@cn...> Signed-off-by: Wanlong Gao <gao...@cn...> commit b379380c698dc58fb9aa403c6bca0bd735e3c2e8 Author: DAN LI <li...@cn...> Date: Fri Apr 19 11:32:23 2013 +0800 syscalls/adjtimex01.c: cleanup cleanup for syscalls/adjtimex01.c Signed-off-by: DAN LI <li...@cn...> Reviewed-by: Wanlong Gao <gao...@cn...> Signed-off-by: Wanlong Gao <gao...@cn...> commit 5307e933978c97d7c929ef2208ef19fef0ddfa0d Author: Wanlong Gao <gao...@cn...> Date: Mon Apr 22 10:01:13 2013 +0800 gitignore: add *.eml to gitignore The patch mail may be *.eml. Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + testcases/kernel/syscalls/adjtimex/adjtimex01.c | 108 ++++++++--------------- 2 files changed, 38 insertions(+), 71 deletions(-) diff --git a/.gitignore b/.gitignore index 7904fba..d202037 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ patches/ *.patch *.rej *.orig +*.eml *.run-test *.test diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex01.c b/testcases/kernel/syscalls/adjtimex/adjtimex01.c index 000a979..d16a5f3 100644 --- a/testcases/kernel/syscalls/adjtimex/adjtimex01.c +++ b/testcases/kernel/syscalls/adjtimex/adjtimex01.c @@ -12,57 +12,18 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * */ -/********************************************************** - * - * TEST IDENTIFIER : adjtimex01 - * - * EXECUTED BY : root / superuser - * - * TEST TITLE : Basic test for adjtimex(2) - * - * TEST CASE TOTAL : 1 - * - * AUTHOR : Saji Kumar.V.R <saj...@wi...> - * - * SIGNALS - * Uses SIGUSR1 to pause before test if option set. - * (See the parse_opts(3) man page). - * - * DESCRIPTION - * This is a Phase I test for the adjtimex(2) system call. - * It is intended to provide a limited exposure of the system call. - * - * Setup: - * Setup signal handling. - * Pause for SIGUSR1 if option specified. - * Save current parameters in tim_save - * - * Test: - * Loop if the proper options are given. - * call adjtimex with saved timex structure - * Check return value is between 0 & 5 - * Test passed - * Otherwise - * Test failed - * - * Cleanup: - * Print errno log and/or timing stats if options given - * - * USAGE: <for command-line> - * adjtimex01 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-h] [-f] [-p] - * where, -c n : Run n copies concurrently. - * -e : Turn on errno logging. - * -h : Show help screen - * -f : Turn off functional testing - * -i n : Execute test n times. - * -I x : Execute test for x seconds. - * -p : Pause for SIGUSR1 before starting - * -P x : Pause for x seconds between iterations. - * -t : Turn on syscall timing. - * - ****************************************************************/ + +/* + AUTHOR: Saji Kumar.V.R <saj...@wi...> + EXECUTED BY: root / superuser + + TEST ITEMS: + 1. Check to see if adjtimex succeed with mode combination : + ADJ_OFFSET | ADJ_FREQUENCY | ADJ_MAXERROR | ADJ_ESTERROR | + ADJ_STATUS | ADJ_TIMECONST | ADJ_TICK + 2. Check to see if adjtimex succeed with mode ADJ_OFFSET_SINGLESHOT +*/ #if defined UCLINUX && !__THROW /* workaround for libc bug causing failure in sys/timex.h */ @@ -74,20 +35,19 @@ #include "test.h" #include "usctest.h" -#define SET_MODE ( ADJ_OFFSET | ADJ_FREQUENCY | ADJ_MAXERROR | ADJ_ESTERROR | \ - ADJ_STATUS | ADJ_TIMECONST | ADJ_TICK ) +#define SET_MODE (ADJ_OFFSET | ADJ_FREQUENCY | ADJ_MAXERROR | ADJ_ESTERROR | \ + ADJ_STATUS | ADJ_TIMECONST | ADJ_TICK) -static void setup(); -static void cleanup(); +static void setup(void); +static void cleanup(void); char *TCID = "adjtimex01"; -int TST_TOTAL = 1; +int TST_TOTAL = 2; static struct timex tim_save; int main(int ac, char **av) { - int lc; char *msg; @@ -106,10 +66,26 @@ int main(int ac, char **av) TEST(adjtimex(&tim_save)); if ((TEST_RETURN >= 0) && (TEST_RETURN <= 5)) { - tst_resm(TPASS, "adjtimex() returned %ld", TEST_RETURN); + tst_resm(TPASS, "adjtimex() with mode %u returned %ld", + SET_MODE, TEST_RETURN); + } else { + tst_resm(TFAIL | TTERRNO, + "Test Failed, adjtimex() with mode %u " + "returned %ld", SET_MODE, TEST_RETURN); + } + + /* Call adjtimex(2) */ + tim_save.modes = ADJ_OFFSET_SINGLESHOT; + + TEST(adjtimex(&tim_save)); + + if ((TEST_RETURN >= 0) && (TEST_RETURN <= 5)) { + tst_resm(TPASS, "adjtimex() with mode %u returned %ld", + ADJ_OFFSET_SINGLESHOT, TEST_RETURN); } else { - tst_resm(TFAIL | TTERRNO, "Test Failed, adjtimex()" - "returned %ld", TEST_RETURN); + tst_resm(TFAIL | TTERRNO, + "Test Failed, adjtimex() with mode %u returned " + "%ld", ADJ_OFFSET_SINGLESHOT, TEST_RETURN); } } @@ -118,10 +94,8 @@ int main(int ac, char **av) tst_exit(); } -/* setup() - performs all ONE TIME setup for this test */ -void setup() +static void setup(void) { - tst_require_root(NULL); tim_save.modes = 0; @@ -136,15 +110,7 @@ void setup() "failed to save current parameters"); } -/* - *cleanup() - performs all ONE TIME cleanup for this test at - * completion or premature exit. - */ -void cleanup() +static void cleanup(void) { - /* - * print timing stats if that option was specified. - * print errno log if that option was specified. - */ TEST_CLEANUP; } hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-19 12:22:25
|
The branch, master, has been updated via 5f070bc21e68409a106b2fcb1c48f574f2d3ee09 (commit) from 2f474a8158d13b339bf9bc7257c475b17031761e (commit) - Log ----------------------------------------------------------------- commit 5f070bc21e68409a106b2fcb1c48f574f2d3ee09 Author: Jan Stancek <jst...@re...> Date: Fri Apr 19 14:00:02 2013 +0200 growfiles: fix copy paste error in -O parameter This condition should check parameter it just parsed. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/fs/doio/growfiles.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c index 8d82ff8..44c943e 100644 --- a/testcases/kernel/fs/doio/growfiles.c +++ b/testcases/kernel/fs/doio/growfiles.c @@ -635,7 +635,7 @@ int main(int argc, char **argv) case 'O': if (sscanf(optarg, "%i", &Alignment) != 1 || - num_auto_files < 0) { + Alignment < 0) { fprintf(stderr, "%s%s: --O option arg invalid\n", hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-19 10:22:25
|
The branch, master, has been updated via 2f474a8158d13b339bf9bc7257c475b17031761e (commit) from 768637838d3f05888a49d1f716971443d69fe8e2 (commit) - Log ----------------------------------------------------------------- commit 2f474a8158d13b339bf9bc7257c475b17031761e Author: Jan Stancek <jst...@re...> Date: Fri Apr 19 11:49:47 2013 +0200 syscalls/write05: fix SIGPIPE check WIFSIGNALED(status) returns true if the child process was terminated by a signal. WTERMSIG(status) returns the number of the signal that caused the child process to terminate. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/write/write05.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/write/write05.c b/testcases/kernel/syscalls/write/write05.c index 699bd11..5394bbd 100644 --- a/testcases/kernel/syscalls/write/write05.c +++ b/testcases/kernel/syscalls/write/write05.c @@ -162,7 +162,8 @@ int main(int argc, char **argv) tst_resm(TFAIL, "Fork failed"); } wait(&status); - if (WIFSIGNALED(status) == SIGPIPE) { + if (WIFSIGNALED(status) && + WTERMSIG(status) == SIGPIPE) { tst_resm(TFAIL, "child set SIGPIPE in exit"); } else if (WEXITSTATUS(status) != 0) { TEST_ERROR_LOG(WEXITSTATUS(status)); hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-17 14:21:23
|
The branch, master, has been updated via 768637838d3f05888a49d1f716971443d69fe8e2 (commit) via 4f2ab1360cae73e2d0816a90962ee6f35e6e6ec5 (commit) via 6d669cc3350245fb5b14b423a7291a4e7f56ac0f (commit) via 775d84c8aa7bb34d2c0f65c522d5e24297506ac1 (commit) via 495581c4f868d738d3d245ae7c8a5520e789e36e (commit) from cb2967b27a65becc2c7c6fe8ea29a1b832fb5adc (commit) - Log ----------------------------------------------------------------- commit 768637838d3f05888a49d1f716971443d69fe8e2 Merge: cb2967b 4f2ab13 Author: Cyril Hrubis <ch...@su...> Date: Wed Apr 17 15:26:56 2013 +0200 Merge ../ltp-dev commit 4f2ab1360cae73e2d0816a90962ee6f35e6e6ec5 Author: Cyril Hrubis <ch...@su...> Date: Wed Apr 17 15:25:06 2013 +0200 openposix/.../sched_getscheduler/7-1: Fix. Return UNTESTED for failed optional behavior. Signed-off-by: Cyril Hrubis <ch...@su...> commit 6d669cc3350245fb5b14b423a7291a4e7f56ac0f Author: Cyril Hrubis <ch...@su...> Date: Wed Apr 17 15:23:36 2013 +0200 openposix/.../sched_getparam/6-1: Fix. Return UNTESTED for failed optional behavior. Signed-off-by: Cyril Hrubis <ch...@su...> commit 775d84c8aa7bb34d2c0f65c522d5e24297506ac1 Author: Cyril Hrubis <ch...@su...> Date: Wed Apr 17 15:18:59 2013 +0200 open_posix_testsuite/.../aio_return: Fix. Return UNTESTED instead of UNRESOLVED when aio_return() didn't failed as the tested behavior is optional. Signed-off-by: Cyril Hrubis <ch...@su...> commit 495581c4f868d738d3d245ae7c8a5520e789e36e Author: Cyril Hrubis <ch...@su...> Date: Wed Apr 17 15:07:57 2013 +0200 openposix/.../aio_error/3-1: Fix. The same as previous, the test tests for optional behavior and returns UNRESOLVED, which is wrong. Fix it by returning UNTESTED. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/aio_error/3-1.c | 2 +- .../conformance/interfaces/aio_return/1-1.c | 10 +++++----- .../conformance/interfaces/aio_return/2-1.c | 12 ++++++------ .../conformance/interfaces/aio_return/3-1.c | 14 +++++++------- .../conformance/interfaces/aio_return/3-2.c | 12 ++++++------ .../conformance/interfaces/aio_return/4-1.c | 14 +++++++------- .../conformance/interfaces/sched_getparam/6-1.c | 2 +- .../interfaces/sched_getscheduler/7-1.c | 6 +++--- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c index 5d5dbe8..c88be99 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c @@ -70,7 +70,7 @@ int main(void) if (ret != EINVAL) { printf(TNAME " return code didn't match expected " "value (%d != %d).\n", ret, EINVAL); - return PTS_UNRESOLVED; + return PTS_UNTESTED; } close(fd); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/1-1.c index a76ebd6..b10b346 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/1-1.c @@ -53,7 +53,7 @@ int main(void) if (fd == -1) { printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } unlink(tmpfname); @@ -67,7 +67,7 @@ int main(void) if (aio_write(&aiocb) == -1) { close(fd); printf(TNAME " Error at aio_write(): %s\n", strerror(errno)); - exit(PTS_FAIL); + return PTS_FAIL; } do { @@ -81,15 +81,15 @@ int main(void) close(fd); printf(TNAME " Error at aio_return(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } else if (retval != BUF_SIZE) { close(fd); printf(TNAME "aio_return didn't return expected size: %d\n", retval); - exit(PTS_FAIL); + return PTS_FAIL; } close(fd); printf("Test PASSED\n"); - exit(PTS_PASS); + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/2-1.c index 77d976d..8782dd0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/2-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/2-1.c @@ -51,7 +51,7 @@ int main(void) if (fd == -1) { printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } unlink(tmpfname); @@ -66,7 +66,7 @@ int main(void) close(fd); printf(TNAME " Error at aio_write(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } do { @@ -82,7 +82,7 @@ int main(void) close(fd); printf(TNAME " aio_return didn't return expected size: " "%d\n", retval); - exit(PTS_FAIL); + return PTS_FAIL; } retval = aio_return(&aiocb); @@ -91,17 +91,17 @@ int main(void) close(fd); printf(TNAME " Second call to aio_return() may " "return -1; aio_return() returned %d\n", retval); - exit(PTS_UNRESOLVED); + return PTS_UNTESTED; } } else { close(fd); printf(TNAME " Error at aio_error(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } close(fd); printf("Test PASSED\n"); - exit(PTS_PASS); + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-1.c index bdb1a83..8b2d649 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-1.c @@ -56,7 +56,7 @@ int main(void) if (fd == -1) { printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } unlink(tmpfname); @@ -71,7 +71,7 @@ int main(void) close(fd); printf(TNAME " Error at aio_write(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } do { @@ -85,7 +85,7 @@ int main(void) close(fd); printf(TNAME " Error at aio_return(): %d, %s\n", retval, strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } memset(&aiocb, 0, sizeof(struct aiocb)); @@ -97,7 +97,7 @@ int main(void) close(fd); printf(TNAME " Error at aio_write(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } do { @@ -111,19 +111,19 @@ int main(void) close(fd); printf(TNAME " Error at aio_return(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } else { if (retval != (BUF_SIZE / 2)) { close(fd); printf(TNAME " aio_return() didn't fail as expected: " "%d, %s\n", retval, strerror(aio_error(&aiocb))); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } } close(fd); printf("Test PASSED\n"); - exit(PTS_PASS); + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-2.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-2.c index 8df6585..d5711a0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/3-2.c @@ -54,7 +54,7 @@ int main(void) if (fd == -1) { printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } unlink(tmpfname); @@ -69,7 +69,7 @@ int main(void) close(fd); printf(TNAME " Error at aio_write(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } do { @@ -82,14 +82,14 @@ int main(void) if (retval == -1) { printf(TNAME " Error at aio_error(): %s\n", strerror(aio_error(&aiocb))); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } else { if (retval != BUF_SIZE) { close(fd); printf(TNAME " Error at aio_return(): %d, %s\n", retval, strerror(aio_error(&aiocb))); - exit(PTS_FAIL); + return PTS_FAIL; } retval = aio_return(&aiocb); @@ -99,12 +99,12 @@ int main(void) printf(TNAME " aio_return() may fail with (-1, %d); " "failed with (%d, %d) instead\n", EINVAL, retval, aio_error(&aiocb)); - exit(PTS_UNRESOLVED); + return PTS_UNTESTED; } } close(fd); printf("Test PASSED\n"); - exit(PTS_PASS); + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/4-1.c index 388c985..c4d0e94 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_return/4-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_return/4-1.c @@ -54,7 +54,7 @@ int main(void) if (fd == -1) { printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } unlink(tmpfname); @@ -68,7 +68,7 @@ int main(void) if (aio_write(&aiocb) == -1) { close(fd); printf(TNAME " Error at aio_write(): %s\n", strerror(errno)); - exit(PTS_FAIL); + return PTS_FAIL; } do { @@ -89,8 +89,8 @@ int main(void) if (retval != -1 || aio_error(&aiocb) != EINVAL) { close(fd); - printf(TNAME " aio_return() may fail\n"); - exit(PTS_UNRESOLVED); + printf(TNAME "aio_return() have not failed\n"); + return PTS_UNTESTED; } retval = aio_return(&aiocb); @@ -99,16 +99,16 @@ int main(void) close(fd); printf(TNAME " Error at aio_return(): %d, %s\n", retval, strerror(aio_error(&aiocb))); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } } else { close(fd); printf(TNAME " Error at aio_error(): %s\n", strerror(retval)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } close(fd); printf("Test PASSED\n"); - exit(PTS_PASS); + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/6-1.c index c27695d..2c9c5d5 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/6-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getparam/6-1.c @@ -94,7 +94,7 @@ int main(void) } if (result == 0) { printf("The function sched_getparam has successed.\n"); - return PTS_UNRESOLVED; + return PTS_UNTESTED; } if (errno != EPERM) { perror("errno is not EPERM: The system allows a non-root" diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/7-1.c index 04a43b3..d0be68d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/7-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_getscheduler/7-1.c @@ -21,8 +21,8 @@ #include <string.h> #include "posixtest.h" -/** Set the euid of this process to a non-root uid */ -int set_nonroot() +/* Set the euid of this process to a non-root uid */ +int set_nonroot(void) { struct passwd *pw; setpwent(); @@ -74,7 +74,7 @@ int main(void) } if (result == 0) { printf("The function sched_getscheduler has successed.\n"); - return PTS_UNRESOLVED; + return PTS_UNTESTED; } if (errno != EPERM) { perror("errno is not EPERM"); hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-17 13:21:22
|
The branch, master, has been updated via cb2967b27a65becc2c7c6fe8ea29a1b832fb5adc (commit) via 6a9c0edee0984a1f6e8ca8f0dcace7278489d72c (commit) from c0e21fd8bb45f537154acd91489b048079dda2f0 (commit) - Log ----------------------------------------------------------------- commit cb2967b27a65becc2c7c6fe8ea29a1b832fb5adc Author: Lans Zhang <jia...@wi...> Date: Wed Apr 17 16:35:27 2013 +0800 mem: Fix short of nodemask array. In kernel, if user specified more nodes, e.g, 512 nodes, than the supported, e.g, 4 nodes, kernel will check if the non supported part, e.g, 508 nodes, is all zeroed in node bitmap. Currently, we are overrunning "nmask", whose length is shorter than MAXNODES, and where the unsupported bits should be cleared to pass the check. Signed-off-by: Lans Zhang <lan...@gm...> Reviewed-by: Jan Stancek <jst...@re...> Reviewed-by: Wanlong Gao <gao...@cn...> Reviewed-by: Zhouping Liu <zl...@re...> Signed-off-by: Wanlong Gao <gao...@cn...> commit 6a9c0edee0984a1f6e8ca8f0dcace7278489d72c Author: Cyril Hrubis <ch...@su...> Date: Wed Apr 17 14:58:32 2013 +0200 openposix/.../clock_getcpuid/5-1: Fix. As rights for clock_getcpuid() are implementation defined, let's return UNTESTED rather than UNRESOLVED. As UNRESOLVED means that error has happen prior the test execution. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/mem/cpuset/cpuset01.c | 11 +++++++---- testcases/kernel/mem/include/mem.h | 6 ++++++ testcases/kernel/mem/ksm/ksm02.c | 6 +++--- testcases/kernel/mem/ksm/ksm04.c | 6 +++--- testcases/kernel/mem/lib/mem.c | 9 +++++---- .../interfaces/clock_getcpuclockid/5-1.c | 5 ++--- 6 files changed, 26 insertions(+), 17 deletions(-) diff --git a/testcases/kernel/mem/cpuset/cpuset01.c b/testcases/kernel/mem/cpuset/cpuset01.c index 1069335..99fbb9c 100644 --- a/testcases/kernel/mem/cpuset/cpuset01.c +++ b/testcases/kernel/mem/cpuset/cpuset01.c @@ -93,7 +93,7 @@ static void testcpuset(void) { int lc; int child, i, status; - unsigned long nmask = 0; + unsigned long nmask[MAXNODES / BITS_PER_LONG] = { 0 }; char mems[BUFSIZ], buf[BUFSIZ]; read_cpuset_files(CPATH, "cpus", buf); @@ -107,9 +107,12 @@ static void testcpuset(void) case -1: tst_brkm(TBROK | TERRNO, cleanup, "fork"); case 0: - for (i = 0; i < nnodes; i++) - nmask += 1 << nodes[i]; - if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) + for (i = 0; i < nnodes; i++) { + if (nodes[i] >= MAXNODES) + continue; + set_node(nmask, nodes[i]); + } + if (set_mempolicy(MPOL_BIND, nmask, MAXNODES) == -1) tst_brkm(TBROK | TERRNO, cleanup, "set_mempolicy"); exit(mem_hog_cpuset(ncpus > 1 ? ncpus : 1)); } diff --git a/testcases/kernel/mem/include/mem.h b/testcases/kernel/mem/include/mem.h index c9e0540..9e96b31 100644 --- a/testcases/kernel/mem/include/mem.h +++ b/testcases/kernel/mem/include/mem.h @@ -14,6 +14,12 @@ #define PATH_SYS_SYSTEM "/sys/devices/system" #define PATH_SYSVM "/proc/sys/vm/" #define PATH_MEMINFO "/proc/meminfo" +#define BITS_PER_LONG (8 * sizeof(long)) + +static inline void set_node(unsigned long *array, unsigned int node) +{ + array[node / BITS_PER_LONG] |= 1UL << (node % BITS_PER_LONG); +} /* OOM */ diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c index 412b52e..6c96c74 100644 --- a/testcases/kernel/mem/ksm/ksm02.c +++ b/testcases/kernel/mem/ksm/ksm02.c @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) int lc; char *msg; int size = 128, num = 3, unit = 1; - unsigned long nmask = 0; + unsigned long nmask[MAXNODES / BITS_PER_LONG] = { 0 }; unsigned int node; msg = parse_opts(argc, argv, ksm_options, ksm_usage); @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); node = get_a_numa_node(tst_exit); - nmask = 1 << node; + set_node(nmask, node); setup(); @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) tst_count = 0; check_ksm_options(&size, &num, &unit); - if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) { + if (set_mempolicy(MPOL_BIND, nmask, MAXNODES) == -1) { if (errno != ENOSYS) tst_brkm(TBROK | TERRNO, cleanup, "set_mempolicy"); diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c index e164b29..ed5e0b3 100644 --- a/testcases/kernel/mem/ksm/ksm04.c +++ b/testcases/kernel/mem/ksm/ksm04.c @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) int lc; char *msg; int size = 128, num = 3, unit = 1; - unsigned long nmask = 0; + unsigned long nmask[MAXNODES / BITS_PER_LONG] = { 0 }; unsigned int node; msg = parse_opts(argc, argv, ksm_options, ksm_usage); @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); node = get_a_numa_node(tst_exit); - nmask = 1 << node; + set_node(nmask, node); setup(); @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) write_memcg(); - if (set_mempolicy(MPOL_BIND, &nmask, MAXNODES) == -1) { + if (set_mempolicy(MPOL_BIND, nmask, MAXNODES) == -1) { if (errno != ENOSYS) tst_brkm(TBROK | TERRNO, cleanup, "set_mempolicy"); diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c index f6aa351..da98552 100644 --- a/testcases/kernel/mem/lib/mem.c +++ b/testcases/kernel/mem/lib/mem.c @@ -95,7 +95,7 @@ static void set_global_mempolicy(int mempolicy) { #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \ && HAVE_MPOL_CONSTANTS - unsigned long nmask = 0; + unsigned long nmask[MAXNODES / BITS_PER_LONG] = { 0 }; unsigned int num_nodes, *nodes; int ret; @@ -112,7 +112,7 @@ static void set_global_mempolicy(int mempolicy) switch(mempolicy) { case MPOL_BIND: /* bind the second node */ - nmask = 1 << nodes[1]; + set_node(nmask, nodes[1]); break; case MPOL_INTERLEAVE: case MPOL_PREFERRED: @@ -123,13 +123,14 @@ static void set_global_mempolicy(int mempolicy) return; } else { /* Using the 2nd,3rd node */ - nmask = (1 << nodes[1]) | (1 << nodes[2]); + set_node(nmask, nodes[1]); + set_node(nmask, nodes[2]); } break; default: tst_brkm(TBROK|TERRNO, cleanup, "Bad mempolicy mode"); } - if (set_mempolicy(mempolicy, &nmask, MAXNODES) == -1) + if (set_mempolicy(mempolicy, nmask, MAXNODES) == -1) tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); } #endif diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c index 7d15a9d..aab6250 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/5-1.c @@ -39,7 +39,6 @@ int main(void) setgid(pwd->pw_gid); setuid(pwd->pw_uid); } - } /* Hmmm -- above steps failed :(... */ @@ -51,8 +50,8 @@ int main(void) /* Try and get the cpu clock ID for init(1) :)... */ error = clock_getcpuclockid(1, &clockid_1); if (error == 0) { - printf("clock_getcpuclockid(1, ..) passed unexpectedly\n"); - return PTS_UNRESOLVED; + printf("clock_getcpuclockid(1, ..) passed\n"); + return PTS_UNTESTED; } else if (error != EPERM) { printf("clock_getcpuclockid(1, ..) failed with an improper " "error (%d != %d)\n", EPERM, error); hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-17 09:21:28
|
The branch, master, has been updated via c0e21fd8bb45f537154acd91489b048079dda2f0 (commit) via 17ea0a9df5289d0c452442cd899fdaaa283343d8 (commit) from 1cd320783ef85daf11f5cbff721edd69cd172522 (commit) - Log ----------------------------------------------------------------- commit c0e21fd8bb45f537154acd91489b048079dda2f0 Author: Jan Stancek <jst...@re...> Date: Wed Apr 17 11:09:48 2013 +0200 aio01: fix compare loop For loop was breaking unconditionally after 1st iteration. Signed-off-by: Jan Stancek <jst...@re...> commit 17ea0a9df5289d0c452442cd899fdaaa283343d8 Author: Jan Stancek <jst...@re...> Date: Wed Apr 17 11:05:33 2013 +0200 aio01: fix arg types in tst_resm TEST_RETURN type is long. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/io/aio/aio01/aio01.c | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/testcases/kernel/io/aio/aio01/aio01.c b/testcases/kernel/io/aio/aio01/aio01.c index d30697d..b82bb7a 100644 --- a/testcases/kernel/io/aio/aio01/aio01.c +++ b/testcases/kernel/io/aio/aio01/aio01.c @@ -141,8 +141,8 @@ int main(int argc, char **argv) } while (TEST_RETURN == -EAGAIN); if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); - tst_resm(TFAIL, "Test 1: io_submit failed - retval=%d, " - "errno=%d", TEST_RETURN, TEST_ERRNO); + tst_resm(TFAIL, "Test 1: io_submit failed - retval=%ld" + ", errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; } @@ -173,8 +173,8 @@ int main(int argc, char **argv) } while (TEST_RETURN == -EAGAIN); if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); - tst_resm(TFAIL, "Test 2: io_submit failed - retval=%d, " - "errno=%d", TEST_RETURN, TEST_ERRNO); + tst_resm(TFAIL, "Test 2: io_submit failed - retval=%ld" + ", errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; } @@ -205,8 +205,8 @@ int main(int argc, char **argv) } while (TEST_RETURN == -EAGAIN); if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); - tst_resm(TFAIL, "Test 3: io_submit failed - retval=%d, " - "errno=%d", TEST_RETURN, TEST_ERRNO); + tst_resm(TFAIL, "Test 3: io_submit failed - retval=%ld" + ", errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; } @@ -237,8 +237,8 @@ int main(int argc, char **argv) } while (TEST_RETURN == -EAGAIN); if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); - tst_resm(TFAIL, "Test 4: io_submit failed - retval=%d, " - "errno=%d", TEST_RETURN, TEST_ERRNO); + tst_resm(TFAIL, "Test 4: io_submit failed - retval=%ld" + ", errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; } @@ -270,7 +270,7 @@ int main(int argc, char **argv) if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); tst_resm(TFAIL, "Test 5: write io_submit failed - " - "retval=%d, errno=%d", TEST_RETURN, + "retval=%ld, errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; @@ -285,7 +285,7 @@ int main(int argc, char **argv) if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); tst_resm(TFAIL, "Test 5: read io_submit failed - " - "retval=%d, errno=%d", TEST_RETURN, + "retval=%ld, errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; @@ -318,7 +318,7 @@ int main(int argc, char **argv) if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); tst_resm(TFAIL, "Test 6: write io_submit failed - " - "retval=%d, errno=%d", TEST_RETURN, + "retval=%ld, errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; @@ -333,18 +333,19 @@ int main(int argc, char **argv) if (TEST_RETURN < 0) { TEST_ERROR_LOG(TEST_ERRNO); tst_resm(TFAIL, "Test 6: read io_submit failed - " - "retval=%d, errno=%d", TEST_RETURN, + "retval=%ld, errno=%d", TEST_RETURN, TEST_ERRNO); failflag = 1; continue; } while (io_getevents(io_ctx, 1, 1, &event, &ts) != 1) ; for (j = 0; j < bufsize; j++) { - if (srcbuf[j] != dstbuf[j]) + if (srcbuf[j] != dstbuf[j]) { tst_resm(TFAIL, "Test 6: compare failed - " "read: %c, " "actual: %c", dstbuf[j], srcbuf[j]); - break; + break; + } } gettimeofday(&etv, NULL); } hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-17 08:21:46
|
The branch, master, has been updated via 1cd320783ef85daf11f5cbff721edd69cd172522 (commit) from d7f19f585842f5546dadcfff8e33c40280113887 (commit) - Log ----------------------------------------------------------------- commit 1cd320783ef85daf11f5cbff721edd69cd172522 Author: Jan Stancek <jst...@re...> Date: Mon Apr 15 09:58:29 2013 +0200 sendmsg testcase for ded34e0fe8fe8c2d595bfa30626654e4b87621e0 reproducer for: BUG: unable to handle kernel NULL pointer dereference at 0000000000000250 fixed in 3.9.0-0.rc5: commit ded34e0fe8fe8c2d595bfa30626654e4b87621e0 Author: Paul Moore <pm...@re...> Date: Mon Mar 25 03:18:33 2013 +0000 unix: fix a race condition in unix_release() This reproducer should be able to trigger it easily on 4+ CPU systems just within couple of seconds. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: runtest/syscalls | 1 + testcases/kernel/syscalls/.gitignore | 1 + testcases/kernel/syscalls/sendmsg/sendmsg02.c | 230 +++++++++++++++++++++++++ 3 files changed, 232 insertions(+), 0 deletions(-) create mode 100644 testcases/kernel/syscalls/sendmsg/sendmsg02.c diff --git a/runtest/syscalls b/runtest/syscalls index f58b6a1..90b4542 100644 --- a/runtest/syscalls +++ b/runtest/syscalls @@ -908,6 +908,7 @@ sendfile08_64 sendfile08_64 sendmsg01 sendmsg01 +sendmsg02 sendmsg02 sendto01 sendto01 diff --git a/testcases/kernel/syscalls/.gitignore b/testcases/kernel/syscalls/.gitignore index ce62f3f..3869193 100644 --- a/testcases/kernel/syscalls/.gitignore +++ b/testcases/kernel/syscalls/.gitignore @@ -721,6 +721,7 @@ /sendfile/sendfile08 /sendfile/sendfile08_64 /sendmsg/sendmsg01 +/sendmsg/sendmsg02 /sendto/sendto01 /set_robust_list/set_robust_list01 /set_thread_area/set_thread_area01 diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg02.c b/testcases/kernel/syscalls/sendmsg/sendmsg02.c new file mode 100644 index 0000000..8f38f2c --- /dev/null +++ b/testcases/kernel/syscalls/sendmsg/sendmsg02.c @@ -0,0 +1,230 @@ +/* + * Copyright (C) 2013 Linux Test Project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it + * is free of the rightful claim of any third person regarding + * infringement or the like. Any license provided herein, whether + * implied or otherwise, applies only to this software file. Patent + * licenses, if any, provided herein do not apply to combinations of + * this program with other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ +/* + * reproducer for: + * BUG: unable to handle kernel NULL ptr deref in selinux_socket_unix_may_send + * fixed in 3.9.0-0.rc5: + * commit ded34e0fe8fe8c2d595bfa30626654e4b87621e0 + * Author: Paul Moore <pm...@re...> + * Date: Mon Mar 25 03:18:33 2013 +0000 + * unix: fix a race condition in unix_release() + */ + +#define _GNU_SOURCE +#include <sys/ipc.h> +#include <sys/stat.h> +#include <sys/sem.h> +#include <sys/socket.h> +#include <sys/types.h> +#include <sys/un.h> +#include <sys/wait.h> +#include <errno.h> +#include <signal.h> +#include "config.h" +#include "test.h" +#include "usctest.h" +#include "safe_macros.h" + +char *TCID = "sendmsg02"; + +static int sem_id; +static int tflag; +static char *t_opt; +static option_t options[] = { + {"s:", &tflag, &t_opt}, + {NULL, NULL, NULL} +}; + +static void setup(void); +static void cleanup(void); + +static void client(int id, int pipefd[]) +{ + int fd, semval; + char data[] = "123456789"; + struct iovec w; + struct sockaddr_un sa; + struct msghdr mh; + struct cmsghdr cmh; + + close(pipefd[0]); + + memset(&sa, 0, sizeof(sa)); + sa.sun_family = AF_UNIX; + snprintf(sa.sun_path, sizeof(sa.sun_path), "socket_test%d", id); + + w.iov_base = data; + w.iov_len = 10; + + memset(&cmh, 0, sizeof(cmh)); + mh.msg_control = &cmh; + mh.msg_controllen = sizeof(cmh); + + memset(&mh, 0, sizeof(mh)); + mh.msg_name = &sa; + mh.msg_namelen = sizeof(struct sockaddr_un); + mh.msg_iov = &w; + mh.msg_iovlen = 1; + + do { + fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + write(pipefd[1], &fd, 1); + sendmsg(fd, &mh, MSG_NOSIGNAL); + close(fd); + semval = semctl(sem_id, 0, GETVAL); + } while (semval != 0); + close(pipefd[1]); +} + +static void server(int id, int pipefd[]) +{ + int fd, semval; + struct sockaddr_un sa; + + close(pipefd[1]); + + memset(&sa, 0, sizeof(sa)); + sa.sun_family = AF_UNIX; + snprintf(sa.sun_path, sizeof(sa.sun_path), "socket_test%d", id); + + do { + fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0); + unlink(sa.sun_path); + bind(fd, (struct sockaddr *) &sa, sizeof(struct sockaddr_un)); + read(pipefd[0], &fd, 1); + close(fd); + semval = semctl(sem_id, 0, GETVAL); + } while (semval != 0); + close(pipefd[0]); +} + +static void reproduce(int seconds) +{ + int i, status, pipefd[2]; + int child_pairs = sysconf(_SC_NPROCESSORS_ONLN)*4; + int child_count = 0; + int *child_pids; + int child_pid; + + child_pids = SAFE_MALLOC(cleanup, sizeof(int) * child_pairs * 2); + + if (semctl(sem_id, 0, SETVAL, 1) == -1) + tst_brkm(TBROK | TERRNO, cleanup, "couldn't set semval to 1"); + + /* fork child for each client/server pair */ + for (i = 0; i < child_pairs*2; i++) { + if (i%2 == 0) { + if (pipe(pipefd) < 0) { + tst_resm(TBROK | TERRNO, "pipe failed"); + break; + } + } + + child_pid = fork(); + switch (child_pid) { + case -1: + tst_resm(TBROK | TERRNO, "fork"); + break; + case 0: + if (i%2 == 0) + server(i, pipefd); + else + client(i-1, pipefd); + exit(0); + default: + child_pids[child_count++] = child_pid; + }; + + /* this process can close the pipe now */ + if (i%2 == 0) { + close(pipefd[0]); + close(pipefd[1]); + } + } + + /* let clients/servers run for a while, then clear semval to signal + * they should stop running now */ + if (child_count == child_pairs*2) + sleep(seconds); + + if (semctl(sem_id, 0, SETVAL, 0) == -1) { + /* kill children if setting semval failed */ + for (i = 0; i < child_count; i++) + kill(child_pids[i], SIGKILL); + tst_resm(TBROK | TERRNO, "couldn't set semval to 0"); + } + + for (i = 0; i < child_count; i++) { + if (waitpid(child_pids[i], &status, 0) == -1) + tst_resm(TBROK | TERRNO, "waitpid for %d failed", + child_pids[i]); + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + tst_resm(TFAIL, "child %d returns %d", i, status); + } + free(child_pids); +} + +static void help(void) +{ + printf(" -s NUM Number of seconds to run.\n"); +} + +int main(int argc, char *argv[]) +{ + int lc; + char *msg; + long seconds; + + msg = parse_opts(argc, argv, options, &help); + if (msg != NULL) + tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg); + setup(); + + seconds = tflag ? SAFE_STRTOL(NULL, t_opt, 1, LONG_MAX) : 15; + for (lc = 0; TEST_LOOPING(lc); lc++) + reproduce(seconds); + tst_resm(TPASS, "finished after %ld seconds", seconds); + + cleanup(); + tst_exit(); +} + +static void setup(void) +{ + tst_require_root(NULL); + tst_tmpdir(); + + sem_id = semget(IPC_PRIVATE, 1, IPC_CREAT | S_IRWXU); + if (sem_id == -1) + tst_brkm(TBROK | TERRNO, NULL, "Couldn't allocate semaphore"); + + TEST_PAUSE; +} + +static void cleanup(void) +{ + TEST_CLEANUP; + semctl(sem_id, 0, IPC_RMID); + tst_rmdir(); +} hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-17 04:21:23
|
The branch, master, has been updated via d7f19f585842f5546dadcfff8e33c40280113887 (commit) via d6b67f8b312f8e9ce7e80b4bede5b741b9b8d41d (commit) via 0b3419364919429a2377771e1475d3aa57c9bc5a (commit) from 6d59a51ec789ec67de9fd68aadf2b3fd0c7740c8 (commit) - Log ----------------------------------------------------------------- commit d7f19f585842f5546dadcfff8e33c40280113887 Author: Zhouping Liu <zl...@re...> Date: Tue Apr 16 22:30:09 2013 +0800 mm/thp: add new case thp05 added new case thp05, which is used to test transparent hugepage under mempolicy - NUMA. Tested-by: Wanlong Gao <gao...@cn...> Signed-off-by: Zhouping Liu <zl...@re...> Signed-off-by: Wanlong Gao <gao...@cn...> commit d6b67f8b312f8e9ce7e80b4bede5b741b9b8d41d Author: Zhouping Liu <zl...@re...> Date: Tue Apr 16 22:30:08 2013 +0800 lib/mem: introduce a new function set_global_mempolicy() Fork out a new function set_global_mempolicy() from the previous testoom() func, which will be useful for other func. Tested-by: Wanlong Gao <gao...@cn...> Signed-off-by: Zhouping Liu <zl...@re...> Signed-off-by: Wanlong Gao <gao...@cn...> commit 0b3419364919429a2377771e1475d3aa57c9bc5a Author: Zhouping Liu <zl...@re...> Date: Tue Apr 16 22:30:07 2013 +0800 mm/thp: new case thp04.c The case is desinged to test THP functionality. when one process allocate hugepage aligned anonymous pages, kernel thread 'khugepaged' controlled by sysfs knobs /sys/kernel/mm/transparent_hugepage/* will scan them, and make them as transparent hugepage if they are suited, you can find out how many transparent hugepages are there in one process from /proc/<pid>/smaps, among the file contents, 'AnonHugePages' entry stand for transparent hugepage. Tested-by: Wanlong Gao <gao...@cn...> Signed-off-by: Zhouping Liu <zl...@re...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: runtest/mm | 6 + testcases/kernel/mem/include/mem.h | 12 ++ testcases/kernel/mem/lib/mem.c | 199 +++++++++++++++++++++++++++++++++++- testcases/kernel/mem/thp/thp04.c | 142 +++++++++++++++++++++++++ testcases/kernel/mem/thp/thp05.c | 153 +++++++++++++++++++++++++++ 5 files changed, 511 insertions(+), 1 deletions(-) create mode 100644 testcases/kernel/mem/thp/thp04.c create mode 100644 testcases/kernel/mem/thp/thp05.c diff --git a/runtest/mm b/runtest/mm index 56b83f8..7c7abf1 100644 --- a/runtest/mm +++ b/runtest/mm @@ -84,6 +84,12 @@ swapping01 swapping01 -i 5 thp01 thp01 -I 120 thp02 thp02 thp03 thp03 +thp04_1 thp04 +thp04_2 thp04 -n 10 -N 20 +thp04_3 thp04 -n 1 -N 300 +thp05_1 thp05 +thp05_2 thp05 -n 10 -N 20 +thp05_3 thp05 -n 1 -N 300 vma01 vma01 vma02 vma02 diff --git a/testcases/kernel/mem/include/mem.h b/testcases/kernel/mem/include/mem.h index fdf558e..c9e0540 100644 --- a/testcases/kernel/mem/include/mem.h +++ b/testcases/kernel/mem/include/mem.h @@ -32,6 +32,18 @@ void testoom(int mempolicy, int lite); #define PATH_KSM "/sys/kernel/mm/ksm/" +/* THP */ + +#define PATH_THP "/sys/kernel/mm/transparent_hugepage/" +#define PATH_KHPD PATH_THP "khugepaged/" + +int opt_nr_children, opt_nr_thps; +char *opt_nr_children_str, *opt_nr_thps_str; +void test_transparent_hugepage(int nr_children, int nr_thps, + int hg_aligned, int mempolicy); +void check_thp_options(int *nr_children, int *nr_thps); +void thp_usage(void); + /* HUGETLB */ #define PATH_SHMMAX "/proc/sys/kernel/shmmax" diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c index c9525e5..f6aa351 100644 --- a/testcases/kernel/mem/lib/mem.c +++ b/testcases/kernel/mem/lib/mem.c @@ -91,7 +91,7 @@ void oom(int testcase, int lite) } } -void testoom(int mempolicy, int lite) +static void set_global_mempolicy(int mempolicy) { #if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \ && HAVE_MPOL_CONSTANTS @@ -133,6 +133,11 @@ void testoom(int mempolicy, int lite) tst_brkm(TBROK|TERRNO, cleanup, "set_mempolicy"); } #endif +} + +void testoom(int mempolicy, int lite) +{ + set_global_mempolicy(mempolicy); tst_resm(TINFO, "start normal OOM testing."); oom(NORMAL, lite); @@ -501,6 +506,198 @@ void ksm_usage(void) printf(" -u Memory allocation unit in MB\n"); } +/* THP */ + +static int alloc_transparent_hugepages(int nr_thps, int hg_aligned) +{ + unsigned long hugepagesize, size; + void *addr; + int ret; + + hugepagesize = read_meminfo("Hugepagesize:") * KB; + size = nr_thps * hugepagesize; + + if (hg_aligned) { + ret = posix_memalign(&addr, hugepagesize, size); + if (ret != 0) { + printf("posix_memalign failed\n"); + return -1; + } + } else { + addr = mmap(NULL, size, PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANON, -1, 0); + if (addr == MAP_FAILED) { + perror("mmap"); + return -1; + } + } + + memset(addr, 10, size); + + tst_resm(TINFO, "child[%d] stop here", getpid()); + /* + * stop here, until the father finish to calculate + * all the transparent hugepages. + */ + if (raise(SIGSTOP) == -1) { + perror("kill"); + return -1; + } + + return 0; +} + +static void khugepaged_scan_done(void) +{ + int changing = 1, count = 0, interval; + long old_pages_collapsed, old_max_ptes_none, old_pages_to_scan; + long pages_collapsed = 0, max_ptes_none = 0, pages_to_scan = 0; + + /* + * as 'khugepaged' run 100% during testing, so 5s is an + * enough interval for us to recognize if 'khugepaged' + * finish scanning proceses' anonymous hugepages or not. + */ + interval = 5; + + while (changing) { + sleep(interval); + count++; + + SAFE_FILE_SCANF(cleanup, PATH_KHPD "pages_collapsed", + "%ld", &pages_collapsed); + SAFE_FILE_SCANF(cleanup, PATH_KHPD "max_ptes_none", + "%ld", &max_ptes_none); + SAFE_FILE_SCANF(cleanup, PATH_KHPD "pages_to_scan", + "%ld", &pages_to_scan); + + if (pages_collapsed != old_pages_collapsed || + max_ptes_none != old_max_ptes_none || + pages_to_scan != old_pages_to_scan) { + old_pages_collapsed = pages_collapsed; + old_max_ptes_none = max_ptes_none; + old_pages_to_scan = pages_to_scan; + } else { + changing = 0; + } + } + + tst_resm(TINFO, "khugepaged daemon takes %ds to scan all thp pages", + count * interval); +} + +static void verify_thp_size(int *children, int nr_children, int nr_thps) +{ + FILE *fp; + char path[BUFSIZ], buf[BUFSIZ], line[BUFSIZ]; + int i, ret; + long expect_thps; /* the amount of per child's transparent hugepages */ + long val, actual_thps; + long hugepagesize; + + hugepagesize = read_meminfo("Hugepagesize:"); + expect_thps = nr_thps * hugepagesize; + + for (i = 0; i < nr_children; i++) { + actual_thps = 0; + + snprintf(path, BUFSIZ, "/proc/%d/smaps", children[i]); + fp = fopen(path, "r"); + while (fgets(line, BUFSIZ, fp) != NULL) { + ret = sscanf(line, "%64s %ld", buf, &val); + if (ret == 2 && val != 0) { + if (strcmp(buf, "AnonHugePages:") == 0) + actual_thps += val; + } + } + + if (actual_thps != expect_thps) + tst_resm(TFAIL, "child[%d] got %ldKB thps - expect %ld" + "KB thps", getpid(), actual_thps, expect_thps); + fclose(fp); + } +} + +void test_transparent_hugepage(int nr_children, int nr_thps, + int hg_aligned, int mempolicy) +{ + unsigned long hugepagesize, memfree; + int i, *pids, ret, status; + char path[BUFSIZ]; + + if (mempolicy) + set_global_mempolicy(mempolicy); + + memfree = read_meminfo("MemFree:"); + tst_resm(TINFO, "The current MemFree is %luMB", memfree / KB); + if (memfree < MB) + tst_resm(TCONF, "Not enough memory for testing"); + + hugepagesize = read_meminfo("Hugepagesize:"); + + pids = malloc(nr_children * sizeof(int)); + if (pids == NULL) + tst_brkm(TBROK | TERRNO, cleanup, "malloc"); + + for (i = 0; i < nr_children; i++) { + switch (pids[i] = fork()) { + case -1: + tst_brkm(TBROK | TERRNO, cleanup, "fork"); + + case 0: + ret = alloc_transparent_hugepages(nr_thps, hg_aligned); + exit(ret); + } + } + + tst_resm(TINFO, "Stop all children..."); + for (i = 0; i < nr_children; i++) { + if (waitpid(pids[i], &status, WUNTRACED) == -1) + tst_brkm(TBROK|TERRNO, cleanup, "waitpid"); + if (!WIFSTOPPED(status)) + tst_brkm(TBROK, cleanup, + "child[%d] was not stoppted", pids[i]); + } + + tst_resm(TINFO, "Start to scan all transparent hugepages..."); + khugepaged_scan_done(); + + tst_resm(TINFO, "Start to verify transparent hugepage size..."); + verify_thp_size(pids, nr_children, nr_thps); + + tst_resm(TINFO, "Wake up all children..."); + for (i = 0; i < nr_children; i++) { + if (kill(pids[i], SIGCONT) == -1) + tst_brkm(TBROK | TERRNO, cleanup, + "signal continue child[%d]", pids[i]); + } + + /* wait all children finish their task */ + for (i = 0; i < nr_children; i++) { + if (waitpid(pids[i], &status, 0) == -1) + tst_brkm(TBROK|TERRNO, cleanup, "waitpid %d", pids[i]); + + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + tst_resm(TFAIL, "the child[%d] unexpectedly failed:" + " %d", pids[i], status); + } +} + +void check_thp_options(int *nr_children, int *nr_thps) +{ + if (opt_nr_children) + *nr_children = SAFE_STRTOL(NULL, opt_nr_children_str, + 0, LONG_MAX); + if (opt_nr_thps) + *nr_thps = SAFE_STRTOL(NULL, opt_nr_thps_str, 0, LONG_MAX); +} + +void thp_usage(void) +{ + printf(" -n Number of processes\n"); + printf(" -N Number of transparent hugepages\n"); +} + /* cpuset/memcg */ static void gather_node_cpus(char *cpus, long nd) diff --git a/testcases/kernel/mem/thp/thp04.c b/testcases/kernel/mem/thp/thp04.c new file mode 100644 index 0000000..d84a3f5 --- /dev/null +++ b/testcases/kernel/mem/thp/thp04.c @@ -0,0 +1,142 @@ +/* + * Copyright (C) 2013 Linux Test Project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it + * is free of the rightful claim of any third person regarding + * infringement or the like. Any license provided herein, whether + * implied or otherwise, applies only to this software file. Patent + * licenses, if any, provided herein do not apply to combinations of + * this program with other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +/* + * The case is designed to test the functionality of transparent + * hugepage - THP + * + * when one process allocate hugepage aligned anonymous pages, + * kernel thread 'khugepaged' controlled by sysfs knobs + * /sys/kernel/mm/transparent_hugepage/ will scan them, and make + * them as transparent hugepage if they are suited, you can find out + * how many transparent hugepages are there in one process from + * /proc/<pid>/smaps, among the file contents, 'AnonHugePages' entry + * stand for transparent hugepage. + */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <errno.h> +#include <fcntl.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include "test.h" +#include "usctest.h" +#include "mem.h" + +char *TCID = "thp04"; +int TST_TOTAL = 1; + +option_t thp_options[] = { + {"n:", &opt_nr_children, &opt_nr_children_str}, + {"N:", &opt_nr_thps, &opt_nr_thps_str}, + {NULL, NULL, NULL} +}; + +static int pre_thp_scan_sleep_millisecs; +static int pre_thp_alloc_sleep_millisecs; +static char pre_thp_enabled[BUFSIZ]; + +int main(int argc, char *argv[]) +{ + int lc; + char *msg; + int nr_children = 2, nr_thps = 64; + + msg = parse_opts(argc, argv, thp_options, thp_usage); + if (msg != NULL) + tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg); + check_thp_options(&nr_children, &nr_thps); + + setup(); + + tst_resm(TINFO, "Start to test transparent hugepage..."); + tst_resm(TINFO, "There are %d children allocating %d " + "transparent hugepages", nr_children, nr_thps); + + for (lc = 0; TEST_LOOPING(lc); lc++) { + tst_count = 0; + + test_transparent_hugepage(nr_children, nr_thps, 1, 0); + } + + cleanup(); + tst_exit(); +} + +void setup(void) +{ + tst_require_root(NULL); + + if (access(PATH_THP, F_OK) == -1) + tst_brkm(TCONF, NULL, "THP is not enabled"); + + SAFE_FILE_SCANF(NULL, PATH_KHPD "scan_sleep_millisecs", + "%d", &pre_thp_scan_sleep_millisecs); + /* set 0 to khugepaged/scan_sleep_millisecs to run khugepaged 100% */ + SAFE_FILE_PRINTF(NULL, PATH_KHPD "scan_sleep_millisecs", "0"); + + SAFE_FILE_SCANF(NULL, PATH_KHPD "alloc_sleep_millisecs", + "%d", &pre_thp_alloc_sleep_millisecs); + /* + * set 0 to khugepaged/alloc_sleep_millisecs to make sure khugepaged + * don't stop if there's a hugepage allcation failure. + */ + SAFE_FILE_PRINTF(NULL, PATH_KHPD "alloc_sleep_millisecs", "0"); + + SAFE_FILE_SCANF(NULL, PATH_THP "enabled", "%[^\n]", pre_thp_enabled); + /* open khugepaged as 'always' mode */ + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "always"); + + tst_sig(FORK, DEF_HANDLER, NULL); + TEST_PAUSE; +} + +void cleanup(void) +{ + SAFE_FILE_PRINTF(NULL, PATH_KHPD "scan_sleep_millisecs", + "%d", pre_thp_scan_sleep_millisecs); + + SAFE_FILE_PRINTF(NULL, PATH_KHPD "alloc_sleep_millisecs", + "%d", pre_thp_alloc_sleep_millisecs); + + /* + * The value of transparent_hugepage/enabled is speical, + * we need to recover the previous value one by one for + * the three mode: always, madvise, never. + */ + if (strcmp(pre_thp_enabled, "[always] madvise never") == 0) + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "always"); + else if (strcmp(pre_thp_enabled, "always [madvise] never") == 0) + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "madvise"); + else + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "never"); + + TEST_CLEANUP; +} diff --git a/testcases/kernel/mem/thp/thp05.c b/testcases/kernel/mem/thp/thp05.c new file mode 100644 index 0000000..8b595ca --- /dev/null +++ b/testcases/kernel/mem/thp/thp05.c @@ -0,0 +1,153 @@ +/* + * Copyright (C) 2013 Linux Test Project + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it + * is free of the rightful claim of any third person regarding + * infringement or the like. Any license provided herein, whether + * implied or otherwise, applies only to this software file. Patent + * licenses, if any, provided herein do not apply to combinations of + * this program with other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ + +/* + * The case is designed to test the functionality of transparent + * hugepage - THP under mempolicy (NUMA) + * + * when one process allocate hugepage aligned anonymous pages, + * kernel thread 'khugepaged' controlled by sysfs knobs + * /sys/kernel/mm/transparent_hugepage/ will scan them, and make + * them as transparent hugepage if they are suited, you can find out + * how many transparent hugepages are there in one process from + * /proc/<pid>/smaps, among the file contents, 'AnonHugePages' entry + * stand for transparent hugepage. + */ + +#include <sys/types.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <errno.h> +#include <fcntl.h> +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include "numa_helper.h" +#include "test.h" +#include "usctest.h" +#include "mem.h" + +char *TCID = "thp05"; +int TST_TOTAL = 1; + +#if HAVE_NUMA_H && HAVE_LINUX_MEMPOLICY_H && HAVE_NUMAIF_H \ + && HAVE_MPOL_CONSTANTS + +option_t thp_options[] = { + {"n:", &opt_nr_children, &opt_nr_children_str}, + {"N:", &opt_nr_thps, &opt_nr_thps_str}, + {NULL, NULL, NULL} +}; + +static int pre_thp_scan_sleep_millisecs; +static int pre_thp_alloc_sleep_millisecs; +static char pre_thp_enabled[BUFSIZ]; + +int main(int argc, char *argv[]) +{ + int lc; + char *msg; + int nr_children = 2, nr_thps = 64; + + msg = parse_opts(argc, argv, thp_options, thp_usage); + if (msg != NULL) + tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg); + check_thp_options(&nr_children, &nr_thps); + + setup(); + + tst_resm(TINFO, "Start to test transparent hugepage..."); + tst_resm(TINFO, "There are %d children allocating %d " + "transparent hugepages", nr_children, nr_thps); + for (lc = 0; TEST_LOOPING(lc); lc++) { + tst_count = 0; + + tst_resm(TINFO, "THP on MPOL_BIND mempolicy..."); + test_transparent_hugepage(nr_children, nr_thps, 1, MPOL_BIND); + + tst_resm(TINFO, "THP on MPOL_INTERLEAVE mempolicy..."); + test_transparent_hugepage(nr_children, nr_thps, 1, + MPOL_INTERLEAVE); + + tst_resm(TINFO, "THP on MPOL_PREFERRED mempolicy..."); + test_transparent_hugepage(nr_children, nr_thps, 1, + MPOL_PREFERRED); + } + + cleanup(); + tst_exit(); +} + +void setup(void) +{ + tst_require_root(NULL); + + if (access(PATH_THP, F_OK) == -1) + tst_brkm(TCONF, NULL, "THP is not enabled"); + + if (!is_numa(NULL)) + tst_brkm(TCONF, NULL, "The case need a NUMA system."); + + SAFE_FILE_SCANF(NULL, PATH_KHPD "scan_sleep_millisecs", + "%d", &pre_thp_scan_sleep_millisecs); + SAFE_FILE_PRINTF(NULL, PATH_KHPD "scan_sleep_millisecs", "0"); + + SAFE_FILE_SCANF(NULL, PATH_KHPD "alloc_sleep_millisecs", + "%d", &pre_thp_alloc_sleep_millisecs); + SAFE_FILE_PRINTF(NULL, PATH_KHPD "alloc_sleep_millisecs", "0"); + + SAFE_FILE_SCANF(NULL, PATH_THP "enabled", "%[^\n]", pre_thp_enabled); + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "always"); + + tst_sig(FORK, DEF_HANDLER, NULL); + TEST_PAUSE; +} + +void cleanup(void) +{ + SAFE_FILE_PRINTF(NULL, PATH_KHPD "scan_sleep_millisecs", + "%d", pre_thp_scan_sleep_millisecs); + + SAFE_FILE_PRINTF(NULL, PATH_KHPD "alloc_sleep_millisecs", + "%d", pre_thp_alloc_sleep_millisecs); + + if (strcmp(pre_thp_enabled, "[always] madvise never") == 0) + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "always"); + else if (strcmp(pre_thp_enabled, "always [madvise] never") == 0) + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "madvise"); + else + SAFE_FILE_PRINTF(NULL, PATH_THP "enabled", "never"); + + TEST_CLEANUP; +} + +#else /* no NUMA */ +int main(void) +{ + tst_brkm(TCONF, NULL, "no NUMA development packages installed."); +} +#endif hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-16 11:21:23
|
The branch, master, has been updated via 6d59a51ec789ec67de9fd68aadf2b3fd0c7740c8 (commit) from 0a78f236117172701a248e3e1570c26a8b41d2d8 (commit) - Log ----------------------------------------------------------------- commit 6d59a51ec789ec67de9fd68aadf2b3fd0c7740c8 Author: Shuang Qiu <shu...@or...> Date: Tue Apr 16 16:09:51 2013 +0800 utimensat_tests.sh: Replace "-E" option for sed. The '-E' option is obsoleted and is no longer supported by sed in most Linux distributions. Use '-r' instead. Signed-off-by: Shuang Qiu <shu...@or...> ----------------------------------------------------------------------- Summary of changes: .../kernel/syscalls/utimensat/utimensat_tests.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh index 6776087..b8eba51 100755 --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh @@ -260,7 +260,7 @@ fi pattern="[[:space:]]*Defaults[[:space:]]*requiretty.*" if grep -q "^${pattern}" $sudoers; then tst_resm TINFO "Comment requiretty in $sudoers for automated testing systems" - if ! sed -E -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then + if ! sed -r -i.$$ -e "s/^($pattern)/#\1/" $sudoers; then tst_resm TBROK "failed to mangle $sudoers properly" exit 1 fi hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-16 02:21:34
|
The branch, master, has been updated via 0a78f236117172701a248e3e1570c26a8b41d2d8 (commit) from c023535ade2b6ae89745cf0d361cd1108b0fd796 (commit) - Log ----------------------------------------------------------------- commit 0a78f236117172701a248e3e1570c26a8b41d2d8 Author: Ramesh YR <ram...@li...> Date: Tue Apr 16 09:31:28 2013 +0800 runltp: syscalls/mount0* and inotify03 tests are getting skipped from runltp's execution Some of the tests which require a block device for their execution are skipped when runltp is run without any block device being specified on commandline.Most of such tests are from syscalls group and as a work around to make these tests run even when no block device is specified,I have made use of loopback device to create a block device with ext4 filesystem. So,runltp is modified to create a block device and set the values for DEVICE and DEVICE_FS_TYPE accordingly. Following are the skipped tests: inotify03 inotify03 -D DEVICE -T DEVICE_FS_TYPE mount01 mount01 -D DEVICE -T DEVICE_FS_TYPE mount02 mount02 -D DEVICE -T DEVICE_FS_TYPE mount03 mount03 -D DEVICE -T DEVICE_FS_TYPE mount04 mount04 -D DEVICE -T DEVICE_FS_TYPE umount01 umount01 -D DEVICE -T DEVICE_FS_TYPE umount02 umount02 -D DEVICE -T DEVICE_FS_TYPE umount03 umount03 -D DEVICE -T DEVICE_FS_TYPE Signed-off-by: Ramesh YR <ram...@li...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: runltp | 53 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 48 insertions(+), 5 deletions(-) diff --git a/runltp b/runltp index 04cc690..a8bf404 100755 --- a/runltp +++ b/runltp @@ -681,14 +681,24 @@ main() if [ -n "$DEVICE" ]; then sed -i "s|DEVICE|$DEVICE|" ${TMP}/alltests + RC=$? else - echo "remove test cases which require the block device." - echo "You can specify it with option -b" - sed -i "/DEVICE/d" ${TMP}/alltests + create_block + if [ $? -eq 0 ]; then + sed -i "s|DEVICE|$DEVICE|" ${TMP}/alltests + RC=$? + else + echo "no block device was specified on commandline." + echo "Block device could not be created using loopback device" + echo "Tests which require block device are disabled." + echo "You can specify it with option -b" + sed -i "/DEVICE/d" ${TMP}/alltests + RC=$? + fi fi - if [ $? -ne 0 ]; then - echo "FATAL: error during prcessing alltests file by sed" + if [ $RC -ne 0 ]; then + echo "FATAL: error during processing alltests file by sed" exit 1 fi @@ -971,8 +981,41 @@ main() exit $VALUE } +create_block() +{ + #create a block device with ext4 filesystem. + dd if=/dev/zero of=${TMP}/test.img bs=1kB count=10240 &>/dev/null + if [ $? -ne 0 ]; then + echo "Failed to create loopback device image, please check disk space and re-run" + return 1 + else + ##search for an unused loop dev + LOOP_DEV=$(losetup -f) + if [ $? -ne 0 ]; then + echo "no unused loop device is found" + return 1 + else + ##attach the created file to loop dev. + losetup $LOOP_DEV ${TMP}/test.img &>/dev/null + if [ $? -ne 0 ]; then + echo "losetup failed to create block device" + return 1 + else + mkfs.ext4 $LOOP_DEV &>/dev/null + [ $? -ne 0 ] && (echo "creating a ext4 block device failed" && return 1) + #set the values in alltests which require block device. + DEVICE=$LOOP_DEV + DEVICE_FS_TYPE="ext4" + return 0 + fi + fi + fi +} + cleanup() { + [ "$LOOP_DEV" ] && losetup -d $LOOP_DEV + [ -e "${TEMP}/test.img" ] && rm -f ${TEMP}/test.img rm -rf ${TMP} } hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-15 18:21:54
|
The branch, master, has been updated via c023535ade2b6ae89745cf0d361cd1108b0fd796 (commit) via aede40b89054619fb78cb687cd431070f31f8697 (commit) via 75cb9117e5a189fdefcbfc18ca257206610dd620 (commit) from 0390eb4f1c62d9d95d04b96cb6582a6145ae3374 (commit) - Log ----------------------------------------------------------------- commit c023535ade2b6ae89745cf0d361cd1108b0fd796 Author: Cyril Hrubis <ch...@su...> Date: Mon Apr 15 19:42:31 2013 +0200 syscalls/getents01: Cover more cases. The testcase now creates several types of files and checks that all of them are included in the getents result. Signed-off-by: Cyril Hrubis <ch...@su...> commit aede40b89054619fb78cb687cd431070f31f8697 Author: Cyril Hrubis <ch...@su...> Date: Mon Apr 15 19:33:23 2013 +0200 safe_macros: Add SAFE_LINK and SAFE_SYMLINK. Signed-off-by: Cyril Hrubis <ch...@su...> commit 75cb9117e5a189fdefcbfc18ca257206610dd620 Author: Cyril Hrubis <ch...@su...> Date: Mon Apr 15 18:56:36 2013 +0200 include/safe_macros.h: Remove redundant semicolon. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: include/safe_macros.h | 22 +++- lib/safe_macros.c | 35 ++++++ testcases/kernel/syscalls/getdents/getdents01.c | 126 +++++++++++++++++++++-- 3 files changed, 168 insertions(+), 15 deletions(-) diff --git a/include/safe_macros.h b/include/safe_macros.h index bb977aa..1047437 100644 --- a/include/safe_macros.h +++ b/include/safe_macros.h @@ -121,14 +121,26 @@ int safe_setgid(const char *file, const int lineno, int safe_setuid(const char *file, const int lineno, void (*cleanup_fn)(void), uid_t uid); -#define SAFE_SETUID(cleanup_fn, uid) \ +#define SAFE_SETUID(cleanup_fn, uid) \ safe_setuid(__FILE__, __LINE__, cleanup_fn, (uid)) int safe_unlink(const char *file, const int lineno, void (*cleanup_fn)(void), const char *pathname); -#define SAFE_UNLINK(cleanup_fn, pathname) \ +#define SAFE_UNLINK(cleanup_fn, pathname) \ safe_unlink(__FILE__, __LINE__, cleanup_fn, (pathname)) +int safe_link(const char *file, const int lineno, + void (cleanup_fn)(void), const char *oldpath, + const char *newpath); +#define SAFE_LINK(cleanup_fn, oldpath, newpath) \ + safe_link(__FILE__, __LINE__, cleanup_fn, (oldpath), (newpath)) + +int safe_symlink(const char *file, const int lineno, + void (cleanup_fn)(void), const char *oldpath, + const char *newpath); +#define SAFE_SYMLINK(cleanup_fn, oldpath, newpath) \ + safe_symlink(__FILE__, __LINE__, cleanup_fn, (oldpath), (newpath)) + ssize_t safe_write(const char *file, const int lineno, void (cleanup_fn)(void), char len_strict, int fildes, const void *buf, size_t nbyte); @@ -159,7 +171,7 @@ unsigned long safe_strtoul(const char *file, const int lineno, void (cleanup_fn) long safe_sysconf(const char *file, const int lineno, void (cleanup_fn)(void), int name); #define SAFE_SYSCONF(cleanup_fn, name) \ - safe_sysconf(__FILE__, __LINE__, cleanup_fn, name); + safe_sysconf(__FILE__, __LINE__, cleanup_fn, name) -#endif -#endif +#endif /* __SAFE_MACROS_H__ */ +#endif /* __TEST_H__ */ diff --git a/lib/safe_macros.c b/lib/safe_macros.c index 0668584..4da9914 100644 --- a/lib/safe_macros.c +++ b/lib/safe_macros.c @@ -294,6 +294,41 @@ safe_unlink(const char *file, const int lineno, void (*cleanup_fn) (void), return (rval); } + +int safe_link(const char *file, const int lineno, + void (cleanup_fn)(void), const char *oldpath, + const char *newpath) +{ + int rval; + + rval = link(oldpath, newpath); + + if (rval == -1) { + tst_brkm(TBROK | TERRNO, cleanup_fn, + "link(%s, %s) failed at %s:%d", + oldpath, newpath, file, lineno); + } + + return rval; +} + +int safe_symlink(const char *file, const int lineno, + void (cleanup_fn)(void), const char *oldpath, + const char *newpath) +{ + int rval; + + rval = symlink(oldpath, newpath); + + if (rval == -1) { + tst_brkm(TBROK | TERRNO, cleanup_fn, + "link(%s, %s) failed at %s:%d", + oldpath, newpath, file, lineno); + } + + return rval; +} + ssize_t safe_write(const char *file, const int lineno, void (cleanup_fn) (void), char len_strict, int fildes, const void *buf, size_t nbyte) diff --git a/testcases/kernel/syscalls/getdents/getdents01.c b/testcases/kernel/syscalls/getdents/getdents01.c index 10cdd55..ab4dfcf 100644 --- a/testcases/kernel/syscalls/getdents/getdents01.c +++ b/testcases/kernel/syscalls/getdents/getdents01.c @@ -27,11 +27,16 @@ #include "test.h" #include "usctest.h" +#include "safe_macros.h" #include "getdents.h" static void cleanup(void); static void setup(void); +static void reset_flags(void); +static void check_flags(void); +static void set_flag(const char *name); + char *TCID = "getdents01"; int TST_TOTAL = 1; @@ -48,7 +53,31 @@ static void help(void) printf(" -l Test the getdents64 system call\n"); } -/* Big enough for both dirp entires + data */ +enum entry_type { + ENTRY_DIR, + ENTRY_FILE, + ENTRY_SYMLINK, +}; + +struct testcase { + const char *name; + enum entry_type type; + int create:1; + int found:1; +}; + +struct testcase testcases[] = { + {.name = ".", .create = 0, .type = ENTRY_DIR}, + {.name = "..", .create = 0, .type = ENTRY_DIR}, + {.name = "dir", .create = 1, .type = ENTRY_DIR}, + {.name = "file", .create = 1, .type = ENTRY_FILE}, + {.name = "symlink", .create = 1, .type = ENTRY_SYMLINK}, +}; + +/* + * Big enough for dirp entires + data, the current size returned + * by kernel is 128 bytes. + */ #define BUFSIZE 512 int main(int ac, char **av) @@ -102,18 +131,36 @@ int main(int ac, char **av) continue; } - if (longsyscall) - d_name = dirp64->d_name; - else - d_name = dirp->d_name; + reset_flags(); - if (strcmp(d_name, ".") && strcmp(d_name, "..")) - tst_resm(TINFO, "First entry is not '.' or '..'"); - else - tst_resm(TPASS, "call succeeded"); + do { + size_t d_reclen; + + if (longsyscall) { + d_reclen = dirp64->d_reclen; + d_name = dirp64->d_name; + } else { + d_reclen = dirp->d_reclen; + d_name = dirp->d_name; + } + + set_flag(d_name); + + tst_resm(TINFO, "Found '%s'", d_name); + + rval -= d_reclen; + + if (longsyscall) + dirp64 = (void*)dirp64 + d_reclen; + else + dirp = (void*)dirp + d_reclen; + + } while (rval > 0); if (close(fd) == -1) - tst_brkm(TBROK, cleanup, "file close failed"); + tst_brkm(TBROK | TERRNO, cleanup, "Directory close failed"); + + check_flags(); } free(buf); @@ -122,12 +169,71 @@ int main(int ac, char **av) tst_exit(); } +static void reset_flags(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(testcases); i++) + testcases[i].found = 0; +} + +static void check_flags(void) +{ + int i, err = 0; + + for (i = 0; i < ARRAY_SIZE(testcases); i++) { + if (!testcases[i].found) { + tst_resm(TINFO, "Entry '%s' not found", testcases[i].name); + err++; + } + } + + if (err) + tst_resm(TFAIL, "Some entires not found"); + else + tst_resm(TPASS, "All entires found"); +} + +static void set_flag(const char *name) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(testcases); i++) { + if (!strcmp(name, testcases[i].name)) { + testcases[i].found = 1; + return; + } + } + + tst_resm(TFAIL, "Unexpected entry '%s' found", name); +} + static void setup(void) { + int i; + tst_sig(NOFORK, DEF_HANDLER, cleanup); tst_tmpdir(); + for (i = 0; i < ARRAY_SIZE(testcases); i++) { + + if (!testcases[i].create) + continue; + + switch (testcases[i].type) { + case ENTRY_DIR: + SAFE_MKDIR(cleanup, testcases[i].name, 0777); + break; + case ENTRY_FILE: + SAFE_FILE_PRINTF(cleanup, testcases[i].name, " "); + break; + case ENTRY_SYMLINK: + SAFE_SYMLINK(cleanup, "nonexistent", testcases[i].name); + break; + } + } + TEST_PAUSE; } hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-15 03:21:33
|
The branch, master, has been updated via 0390eb4f1c62d9d95d04b96cb6582a6145ae3374 (commit) from 9828b2933643f7d73316715fa35e6753b6c0694a (commit) - Log ----------------------------------------------------------------- commit 0390eb4f1c62d9d95d04b96cb6582a6145ae3374 Author: DAN LI <li...@cn...> Date: Tue Apr 9 15:57:52 2013 +0800 testscripts/test_fs_bind.sh: adapt to system which marks mount point as "shared" defaultly Linux kernel does not allow to move a mount residing under a shared mount. This patch tries to make sure test cases of "move" run under a private mount. Signed-off-by: DAN LI <li...@cn...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: testscripts/test_fs_bind.sh | 28 +++++++++++++++++++--------- 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/testscripts/test_fs_bind.sh b/testscripts/test_fs_bind.sh index 92c51a1..792fff2 100755 --- a/testscripts/test_fs_bind.sh +++ b/testscripts/test_fs_bind.sh @@ -107,6 +107,18 @@ test_prereqs() exit -1 fi + mount --bind "${sandbox}" "${sandbox}" >& /dev/null + if [ $? -ne 0 ]; then + tst_brkm TBROK true "$0: failed to perform bind mount on directory \"${sandbox}\"" + exit 1 + fi + + mount --make-private "${sandbox}" >& /dev/null + if [ $? -ne 0 ]; then + tst_brkm TBROK true "$0: failed to make private mountpoint on directory \"${sandbox}\"" + exit 1 + fi + local mnt_bind=1 local mnt_move=1 @@ -153,17 +165,11 @@ test_prereqs() tst_resm TINFO "$0: kernel >= 2.6.15 detected -- continuing" fi - mount --bind "${sandbox}" "${sandbox}" && { - mount --make-shared "${sandbox}" > /dev/null 2>&1 || "${FS_BIND_ROOT}/bin/smount" "${sandbox}" shared - umount "${sandbox}" || { - tst_resm TFAIL "$0: failed to umount simplest shared subtree" - exit 1 - } - } || { - tst_brkm TBROK true "$0: failed to perform bind mount" + mount --make-shared "${sandbox}" > /dev/null 2>&1 || "${FS_BIND_ROOT}/bin/smount" "${sandbox}" shared + umount "${sandbox}" || { + tst_resm TFAIL "$0: failed to umount simplest shared subtree" exit 1 } - tst_resm TPASS "$0: umounted simplest shared subtree" } @@ -428,6 +434,9 @@ run_test() save_sandbox "$tname" "$resdir/$tname" || do_break=1 save_mounts "$tname" "$resdir/$tname" || do_break=1 save_proc_mounts "$tname" "$resdir/$tname" || do_break=1 + mount --bind "${sandbox}" "${sandbox}" >& /dev/null || do_break=1 + mount --make-private "${sandbox}" >& /dev/null || do_break=1 + if [ $do_break -eq 1 ]; then tst_brkm TBROK true "$tname: failed to save pre-test state of \"${sandbox}\"" return 2 @@ -453,6 +462,7 @@ run_test() #echo "SUCCEEDED" ((nsucceeded++)) fi + umount -l "${sandbox}" >& /dev/null check_proc_mounts "$tname" "$resdir/$tname" || \ restore_proc_mounts "$tname" "$resdir/$tname" || do_break=1 check_mounts "$tname" "$resdir/$tname" || \ hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-05 09:21:25
|
The branch, master, has been updated via 9828b2933643f7d73316715fa35e6753b6c0694a (commit) via 8773dec2218cb265160e7be7550f9a9db2ca64a8 (commit) from fdce7d5e2a219d201a2b0e3bab6b61b01ec1d716 (commit) - Log ----------------------------------------------------------------- commit 9828b2933643f7d73316715fa35e6753b6c0694a Author: Wanlong Gao <gao...@cn...> Date: Fri Apr 5 14:12:45 2013 +0800 getdents01: compare "." or ".." to the first entry If dir_index feature is enabled on ext3/4, the first entry may not be ".". So fix to compare "." or ".." to the first entry. Reported-by: DAN LI <li...@cn...> Signed-off-by: Wanlong Gao <gao...@cn...> Acked-by: Cyril Hrubis <ch...@su...> commit 8773dec2218cb265160e7be7550f9a9db2ca64a8 Author: Wanlong Gao <gao...@cn...> Date: Fri Apr 5 09:48:50 2013 +0800 runtest: remove getgroups{02,04} Since commit be0d9d6 wholly removed these two cases. Signed-off-by: Wanlong Gao <gao...@cn...> Acked-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: runtest/ltplite | 2 -- runtest/quickhit | 2 -- runtest/stress.part3 | 2 -- runtest/syscalls | 4 ---- testcases/kernel/syscalls/getdents/getdents01.c | 4 ++-- 5 files changed, 2 insertions(+), 12 deletions(-) diff --git a/runtest/ltplite b/runtest/ltplite index 35cbd44..2a704db 100644 --- a/runtest/ltplite +++ b/runtest/ltplite @@ -290,9 +290,7 @@ getgid01 getgid01 getgid03 getgid03 getgroups01 getgroups01 -getgroups02 getgroups02 getgroups03 getgroups03 -getgroups04 getgroups04 gethostid01 gethostid01 diff --git a/runtest/quickhit b/runtest/quickhit index ea3c9c1..c323d56 100644 --- a/runtest/quickhit +++ b/runtest/quickhit @@ -157,8 +157,6 @@ getgroups01 getgroups01 # where x is one less then what is returned by getgroups(0, gidset). # 4. Check to see if getgroups() succeeds and gidset contains # group id returned from getgid(). -getgroups02 getgroups02 -# Basic test for getgroups(2) gethostid01 gethostid01 # Basic test for gethostid(2) gethostname01 gethostname01 diff --git a/runtest/stress.part3 b/runtest/stress.part3 index f3c4287..b783b7f 100644 --- a/runtest/stress.part3 +++ b/runtest/stress.part3 @@ -229,8 +229,6 @@ getgid01 getgid01 getgid03 getgid03 getgroups01 getgroups01 -getgroups02 getgroups02 -getgroups04 getgroups04 gethostid01 gethostid01 diff --git a/runtest/syscalls b/runtest/syscalls index 758775b..f58b6a1 100644 --- a/runtest/syscalls +++ b/runtest/syscalls @@ -351,12 +351,8 @@ getgid03_16 getgid03_16 getgroups01 getgroups01 getgroups01_16 getgroups01_16 -getgroups02 getgroups02 -getgroups02_16 getgroups02_16 getgroups03 getgroups03 getgroups03_16 getgroups03_16 -getgroups04 getgroups04 -getgroups04_16 getgroups04_16 gethostid01 gethostid01 diff --git a/testcases/kernel/syscalls/getdents/getdents01.c b/testcases/kernel/syscalls/getdents/getdents01.c index fdfb1a0..10cdd55 100644 --- a/testcases/kernel/syscalls/getdents/getdents01.c +++ b/testcases/kernel/syscalls/getdents/getdents01.c @@ -107,8 +107,8 @@ int main(int ac, char **av) else d_name = dirp->d_name; - if (strcmp(d_name, ".")) - tst_resm(TFAIL, "First entry is not '.'"); + if (strcmp(d_name, ".") && strcmp(d_name, "..")) + tst_resm(TINFO, "First entry is not '.' or '..'"); else tst_resm(TPASS, "call succeeded"); hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-04 22:21:42
|
The branch, master, has been updated via fdce7d5e2a219d201a2b0e3bab6b61b01ec1d716 (commit) from c515be23194f988533259dff450ff8da0c7f6ae5 (commit) - Log ----------------------------------------------------------------- commit fdce7d5e2a219d201a2b0e3bab6b61b01ec1d716 Author: Cyril Hrubis <ch...@su...> Date: Thu Apr 4 18:35:48 2013 +0200 Another semiautomated cleanup. Remove comments such as: - /* Test program identifier. */ - /* Total number of test cases. */ - /* Extern Global Variables */ - /* Harness Specific Include Files. */ - /* Standard Include Files */ - /* Parse standard options given to run the test. */ - etc. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../kernel/controllers/cpuctl/cpuctl_def_task01.c | 1 - .../kernel/controllers/cpuctl/cpuctl_def_task02.c | 1 - .../kernel/controllers/cpuctl/cpuctl_def_task03.c | 1 - .../kernel/controllers/cpuctl/cpuctl_def_task04.c | 1 - .../kernel/controllers/cpuctl/cpuctl_test01.c | 1 - .../kernel/controllers/cpuctl/cpuctl_test02.c | 1 - .../kernel/controllers/cpuctl/cpuctl_test03.c | 1 - .../kernel/controllers/cpuctl/cpuctl_test04.c | 1 - .../kernel/controllers/memctl/memctl_test01.c | 1 - .../kernel/mem/mmapstress/mmap-corruption01.c | 1 - testcases/kernel/syscalls/accept/accept01.c | 8 +++----- testcases/kernel/syscalls/accept4/accept4_01.c | 5 ++--- testcases/kernel/syscalls/access/access01.c | 4 ++-- testcases/kernel/syscalls/access/access02.c | 4 ++-- testcases/kernel/syscalls/access/access03.c | 4 ++-- testcases/kernel/syscalls/access/access04.c | 4 ++-- testcases/kernel/syscalls/access/access05.c | 2 +- testcases/kernel/syscalls/acct/acct02.c | 4 ++-- testcases/kernel/syscalls/add_key/add_key01.c | 6 ++---- testcases/kernel/syscalls/add_key/add_key02.c | 8 ++------ testcases/kernel/syscalls/adjtimex/adjtimex01.c | 4 ++-- testcases/kernel/syscalls/adjtimex/adjtimex02.c | 2 +- testcases/kernel/syscalls/alarm/alarm01.c | 4 ++-- testcases/kernel/syscalls/alarm/alarm02.c | 4 ++-- testcases/kernel/syscalls/alarm/alarm03.c | 4 ++-- testcases/kernel/syscalls/alarm/alarm05.c | 4 ++-- testcases/kernel/syscalls/asyncio/asyncio02.c | 4 ++-- testcases/kernel/syscalls/bind/bind01.c | 5 ++--- testcases/kernel/syscalls/bind/bind02.c | 2 +- testcases/kernel/syscalls/brk/brk01.c | 4 ++-- .../kernel/syscalls/cacheflush/cacheflush01.c | 8 ++------ testcases/kernel/syscalls/capget/capget01.c | 4 ++-- testcases/kernel/syscalls/capget/capget02.c | 2 +- testcases/kernel/syscalls/capset/capset01.c | 4 ++-- testcases/kernel/syscalls/capset/capset02.c | 2 +- testcases/kernel/syscalls/chdir/chdir01.c | 4 ++-- testcases/kernel/syscalls/chdir/chdir02.c | 4 ++-- testcases/kernel/syscalls/chmod/chmod02.c | 4 ++-- testcases/kernel/syscalls/chmod/chmod03.c | 4 ++-- testcases/kernel/syscalls/chmod/chmod04.c | 8 ++++---- testcases/kernel/syscalls/chmod/chmod05.c | 4 ++-- testcases/kernel/syscalls/chmod/chmod07.c | 4 ++-- testcases/kernel/syscalls/chown/chown01.c | 4 ++-- testcases/kernel/syscalls/chown/chown02.c | 3 +-- testcases/kernel/syscalls/chown/chown03.c | 2 +- .../kernel/syscalls/clock_getres/clock_getres01.c | 8 ++------ .../syscalls/clock_nanosleep/clock_nanosleep01.c | 8 ++------ .../clock_nanosleep2/clock_nanosleep2_01.c | 8 ++------ testcases/kernel/syscalls/clone/clone04.c | 1 - testcases/kernel/syscalls/close/close08.c | 4 ++-- testcases/kernel/syscalls/confstr/confstr01.c | 4 ++-- testcases/kernel/syscalls/connect/connect01.c | 5 ++--- testcases/kernel/syscalls/creat/creat03.c | 4 ++-- testcases/kernel/syscalls/creat/creat09.c | 4 ++-- testcases/kernel/syscalls/dup/dup02.c | 4 ++-- testcases/kernel/syscalls/dup/dup03.c | 4 ++-- testcases/kernel/syscalls/dup/dup04.c | 4 ++-- testcases/kernel/syscalls/dup/dup05.c | 4 ++-- testcases/kernel/syscalls/dup2/dup201.c | 4 ++-- testcases/kernel/syscalls/dup2/dup204.c | 4 ++-- testcases/kernel/syscalls/dup3/dup3_01.c | 6 ++---- testcases/kernel/syscalls/epoll/epoll-ltp.c | 2 -- .../syscalls/epoll_create1/epoll_create1_01.c | 8 ++------ testcases/kernel/syscalls/eventfd2/eventfd2_01.c | 8 ++------ testcases/kernel/syscalls/eventfd2/eventfd2_02.c | 8 ++------ testcases/kernel/syscalls/eventfd2/eventfd2_03.c | 5 ++--- testcases/kernel/syscalls/execl/execl01.c | 6 +++--- testcases/kernel/syscalls/execle/execle01.c | 6 +++--- testcases/kernel/syscalls/execlp/execlp01.c | 6 +++--- testcases/kernel/syscalls/execv/execv01.c | 6 +++--- testcases/kernel/syscalls/execve/execve01.c | 6 +++--- testcases/kernel/syscalls/execvp/execvp01.c | 6 +++--- .../kernel/syscalls/exit_group/exit_group01.c | 8 ++------ testcases/kernel/syscalls/faccessat/faccessat01.c | 4 ++-- .../kernel/syscalls/fadvise/posix_fadvise01.c | 2 +- .../kernel/syscalls/fadvise/posix_fadvise02.c | 2 +- .../kernel/syscalls/fadvise/posix_fadvise03.c | 2 +- .../kernel/syscalls/fadvise/posix_fadvise04.c | 2 +- testcases/kernel/syscalls/fallocate/fallocate01.c | 4 +--- testcases/kernel/syscalls/fallocate/fallocate02.c | 13 ++++--------- testcases/kernel/syscalls/fallocate/fallocate03.c | 10 ++-------- testcases/kernel/syscalls/fchmod/fchmod01.c | 4 ++-- testcases/kernel/syscalls/fchmod/fchmod02.c | 5 ++--- testcases/kernel/syscalls/fchmod/fchmod03.c | 4 ++-- testcases/kernel/syscalls/fchmod/fchmod04.c | 8 ++++---- testcases/kernel/syscalls/fchmod/fchmod05.c | 5 ++--- testcases/kernel/syscalls/fchmod/fchmod06.c | 4 ++-- testcases/kernel/syscalls/fchmod/fchmod07.c | 3 +-- testcases/kernel/syscalls/fchmodat/fchmodat01.c | 4 ++-- testcases/kernel/syscalls/fchown/fchown01.c | 4 ++-- testcases/kernel/syscalls/fchown/fchown02.c | 3 +-- testcases/kernel/syscalls/fchown/fchown03.c | 3 +-- testcases/kernel/syscalls/fchown/fchown04.c | 4 ++-- testcases/kernel/syscalls/fchown/fchown05.c | 3 +-- testcases/kernel/syscalls/fchownat/fchownat01.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl02.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl03.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl04.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl05.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl07.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl07B.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl08.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl09.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl10.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl14.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl23.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl24.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl25.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl26.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl27.c | 4 ++-- testcases/kernel/syscalls/fcntl/fcntl28.c | 4 ++-- testcases/kernel/syscalls/fdatasync/fdatasync01.c | 4 ++-- testcases/kernel/syscalls/flock/flock01.c | 5 ++--- testcases/kernel/syscalls/flock/flock02.c | 4 ++-- testcases/kernel/syscalls/flock/flock04.c | 4 ++-- testcases/kernel/syscalls/flock/flock05.c | 5 ++--- testcases/kernel/syscalls/flock/flock06.c | 4 ++-- testcases/kernel/syscalls/fpathconf/fpathconf01.c | 2 +- testcases/kernel/syscalls/fstat/fstat01.c | 4 ++-- testcases/kernel/syscalls/fstat/fstat02.c | 8 ++++---- testcases/kernel/syscalls/fstat/fstat03.c | 5 ++--- testcases/kernel/syscalls/fstat/fstat04.c | 9 ++++----- testcases/kernel/syscalls/fstat/fstat05.c | 5 ++--- testcases/kernel/syscalls/fstatat/fstatat01.c | 4 ++-- testcases/kernel/syscalls/fstatfs/fstatfs01.c | 4 ++-- testcases/kernel/syscalls/fsync/fsync01.c | 4 ++-- testcases/kernel/syscalls/ftruncate/ftruncate01.c | 3 +-- testcases/kernel/syscalls/ftruncate/ftruncate02.c | 3 +-- testcases/kernel/syscalls/futimesat/futimesat01.c | 4 ++-- .../syscalls/get_mempolicy/get_mempolicy01.c | 4 ++-- .../syscalls/get_robust_list/get_robust_list01.c | 4 ++-- .../kernel/syscalls/getcontext/getcontext01.c | 4 ++-- testcases/kernel/syscalls/getcwd/getcwd01.c | 1 - .../syscalls/getdomainname/getdomainname01.c | 4 ++-- .../syscalls/getdtablesize/getdtablesize01.c | 4 ++-- testcases/kernel/syscalls/getegid/getegid01.c | 4 ++-- testcases/kernel/syscalls/geteuid/geteuid01.c | 4 ++-- testcases/kernel/syscalls/getgid/getgid01.c | 4 ++-- testcases/kernel/syscalls/gethostid/gethostid01.c | 4 ++-- .../kernel/syscalls/gethostname/gethostname01.c | 4 ++-- testcases/kernel/syscalls/getitimer/getitimer02.c | 1 - testcases/kernel/syscalls/getitimer/getitimer03.c | 1 - .../kernel/syscalls/getpagesize/getpagesize01.c | 4 ++-- .../kernel/syscalls/getpeername/getpeername01.c | 8 +++----- testcases/kernel/syscalls/getpgrp/getpgrp01.c | 4 ++-- testcases/kernel/syscalls/getpid/getpid01.c | 4 ++-- testcases/kernel/syscalls/getpid/getpid02.c | 4 ++-- testcases/kernel/syscalls/getppid/getppid01.c | 4 ++-- .../kernel/syscalls/getpriority/getpriority01.c | 5 ++--- .../kernel/syscalls/getpriority/getpriority02.c | 5 ++--- testcases/kernel/syscalls/getresgid/getresgid01.c | 5 ++--- testcases/kernel/syscalls/getresgid/getresgid02.c | 5 ++--- testcases/kernel/syscalls/getresgid/getresgid03.c | 5 ++--- testcases/kernel/syscalls/getresuid/getresuid01.c | 5 ++--- testcases/kernel/syscalls/getresuid/getresuid02.c | 5 ++--- testcases/kernel/syscalls/getresuid/getresuid03.c | 5 ++--- testcases/kernel/syscalls/getrlimit/getrlimit01.c | 1 - testcases/kernel/syscalls/getrlimit/getrlimit02.c | 2 -- testcases/kernel/syscalls/getrusage/getrusage01.c | 2 +- testcases/kernel/syscalls/getrusage/getrusage02.c | 2 +- .../kernel/syscalls/getsockname/getsockname01.c | 8 +++----- .../kernel/syscalls/getsockopt/getsockopt01.c | 8 +++----- testcases/kernel/syscalls/gettid/gettid01.c | 2 +- .../kernel/syscalls/gettimeofday/gettimeofday01.c | 2 +- .../kernel/syscalls/gettimeofday/gettimeofday02.c | 4 ++-- testcases/kernel/syscalls/getuid/getuid01.c | 4 ++-- testcases/kernel/syscalls/inotify/inotify01.c | 8 ++++---- testcases/kernel/syscalls/inotify/inotify02.c | 8 ++++---- testcases/kernel/syscalls/inotify/inotify03.c | 8 ++++---- .../syscalls/inotify_init/inotify_init1_01.c | 9 ++------- .../syscalls/inotify_init/inotify_init1_02.c | 7 ++----- testcases/kernel/syscalls/ioctl/ioctl03.c | 1 - testcases/kernel/syscalls/ioperm/ioperm01.c | 6 +++--- testcases/kernel/syscalls/ioperm/ioperm02.c | 5 ++--- testcases/kernel/syscalls/iopl/iopl01.c | 6 +++--- testcases/kernel/syscalls/iopl/iopl02.c | 5 ++--- testcases/kernel/syscalls/keyctl/keyctl01.c | 8 ++------ testcases/kernel/syscalls/kill/kill02.c | 4 ++-- testcases/kernel/syscalls/kill/kill09.c | 4 ++-- testcases/kernel/syscalls/kill/kill10.c | 4 ++-- testcases/kernel/syscalls/link/link02.c | 4 ++-- testcases/kernel/syscalls/link/link03.c | 4 ++-- testcases/kernel/syscalls/link/link04.c | 4 ++-- testcases/kernel/syscalls/link/link05.c | 6 +++--- testcases/kernel/syscalls/link/link06.c | 4 ++-- testcases/kernel/syscalls/link/link07.c | 4 ++-- testcases/kernel/syscalls/listen/listen01.c | 8 +++----- testcases/kernel/syscalls/llseek/llseek01.c | 4 ++-- testcases/kernel/syscalls/llseek/llseek02.c | 6 ++---- testcases/kernel/syscalls/lseek/lseek01.c | 4 ++-- testcases/kernel/syscalls/lseek/lseek02.c | 4 ++-- testcases/kernel/syscalls/lseek/lseek04.c | 4 ++-- testcases/kernel/syscalls/lseek/lseek05.c | 4 ++-- testcases/kernel/syscalls/lseek/lseek06.c | 5 ++--- testcases/kernel/syscalls/lseek/lseek07.c | 5 ++--- testcases/kernel/syscalls/lseek/lseek08.c | 5 ++--- testcases/kernel/syscalls/lseek/lseek09.c | 5 ++--- testcases/kernel/syscalls/lseek/lseek10.c | 5 ++--- testcases/kernel/syscalls/lstat/lstat01.c | 4 ++-- testcases/kernel/syscalls/lstat/lstat02.c | 5 ++--- testcases/kernel/syscalls/lstat/lstat03.c | 9 ++++----- testcases/kernel/syscalls/memmap/mem03.c | 4 ++-- testcases/kernel/syscalls/mincore/mincore02.c | 6 ++---- testcases/kernel/syscalls/mkdir/mkdir01.c | 4 ++-- testcases/kernel/syscalls/mkdir/mkdir02.c | 4 ++-- testcases/kernel/syscalls/mkdir/mkdir03.c | 2 +- testcases/kernel/syscalls/mkdir/mkdir04.c | 4 ++-- testcases/kernel/syscalls/mkdir/mkdir05.c | 4 ++-- testcases/kernel/syscalls/mkdir/mkdir08.c | 4 ++-- testcases/kernel/syscalls/mkdir/mkdir09.c | 4 ++-- testcases/kernel/syscalls/mkdirat/mkdirat01.c | 4 ++-- testcases/kernel/syscalls/mknod/mknod01.c | 4 ++-- testcases/kernel/syscalls/mknod/mknod02.c | 5 ++--- testcases/kernel/syscalls/mknod/mknod03.c | 5 ++--- testcases/kernel/syscalls/mknod/mknod04.c | 5 ++--- testcases/kernel/syscalls/mknod/mknod05.c | 5 ++--- testcases/kernel/syscalls/mknod/mknod06.c | 3 +-- testcases/kernel/syscalls/mknod/mknod07.c | 4 ++-- testcases/kernel/syscalls/mknod/mknod08.c | 5 ++--- testcases/kernel/syscalls/mknod/mknod09.c | 5 ++--- testcases/kernel/syscalls/mknodat/mknodat01.c | 4 ++-- testcases/kernel/syscalls/mlock/mlock01.c | 4 ++-- testcases/kernel/syscalls/mlock/mlock02.c | 4 ++-- testcases/kernel/syscalls/mlockall/mlockall01.c | 4 ++-- testcases/kernel/syscalls/mlockall/mlockall02.c | 4 ++-- testcases/kernel/syscalls/mlockall/mlockall03.c | 4 ++-- testcases/kernel/syscalls/mmap/mmap01.c | 5 ++--- testcases/kernel/syscalls/mmap/mmap02.c | 5 ++--- testcases/kernel/syscalls/mmap/mmap03.c | 5 ++--- testcases/kernel/syscalls/mmap/mmap04.c | 5 ++--- testcases/kernel/syscalls/mmap/mmap05.c | 4 ++-- testcases/kernel/syscalls/mmap/mmap06.c | 5 ++--- testcases/kernel/syscalls/mmap/mmap07.c | 5 ++--- testcases/kernel/syscalls/mmap/mmap08.c | 5 ++--- testcases/kernel/syscalls/mount/mount01.c | 4 ++-- testcases/kernel/syscalls/mount/mount02.c | 3 +-- testcases/kernel/syscalls/mount/mount03.c | 4 ++-- testcases/kernel/syscalls/mount/mount04.c | 4 +--- testcases/kernel/syscalls/mq_notify/mq_notify01.c | 8 ++------ testcases/kernel/syscalls/mq_open/mq_open01.c | 8 ++------ .../syscalls/mq_timedreceive/mq_timedreceive01.c | 8 ++------ .../kernel/syscalls/mq_timedsend/mq_timedsend01.c | 8 ++------ testcases/kernel/syscalls/mq_unlink/mq_unlink01.c | 8 ++------ testcases/kernel/syscalls/mremap/mremap01.c | 5 ++--- testcases/kernel/syscalls/mremap/mremap02.c | 5 ++--- testcases/kernel/syscalls/mremap/mremap03.c | 5 ++--- testcases/kernel/syscalls/mremap/mremap04.c | 5 ++--- testcases/kernel/syscalls/msync/msync01.c | 4 ++-- testcases/kernel/syscalls/msync/msync02.c | 4 ++-- testcases/kernel/syscalls/msync/msync03.c | 4 ++-- testcases/kernel/syscalls/msync/msync04.c | 4 ++-- testcases/kernel/syscalls/msync/msync05.c | 4 ++-- testcases/kernel/syscalls/munlock/munlock01.c | 4 ++-- testcases/kernel/syscalls/munlock/munlock02.c | 4 ++-- .../kernel/syscalls/munlockall/munlockall01.c | 4 ++-- .../kernel/syscalls/munlockall/munlockall02.c | 4 ++-- testcases/kernel/syscalls/munmap/munmap01.c | 5 ++--- testcases/kernel/syscalls/munmap/munmap02.c | 5 ++--- testcases/kernel/syscalls/munmap/munmap03.c | 5 ++--- testcases/kernel/syscalls/nanosleep/nanosleep01.c | 5 ++--- testcases/kernel/syscalls/nanosleep/nanosleep02.c | 5 ++--- testcases/kernel/syscalls/nanosleep/nanosleep03.c | 5 ++--- testcases/kernel/syscalls/nanosleep/nanosleep04.c | 5 ++--- testcases/kernel/syscalls/newuname/newuname01.c | 8 ++------ testcases/kernel/syscalls/nftw/nftw.c | 4 ++-- testcases/kernel/syscalls/nftw/nftw64.c | 4 ++-- testcases/kernel/syscalls/nice/nice01.c | 5 ++--- testcases/kernel/syscalls/nice/nice02.c | 5 ++--- testcases/kernel/syscalls/nice/nice03.c | 5 ++--- testcases/kernel/syscalls/nice/nice04.c | 5 ++--- testcases/kernel/syscalls/nice/nice05.c | 4 ++-- testcases/kernel/syscalls/openat/openat01.c | 4 ++-- testcases/kernel/syscalls/pathconf/pathconf01.c | 4 ++-- testcases/kernel/syscalls/pause/pause01.c | 4 ++-- testcases/kernel/syscalls/pause/pause03.c | 5 ++--- testcases/kernel/syscalls/pipe2/pipe2_01.c | 9 ++------- testcases/kernel/syscalls/pipe2/pipe2_02.c | 9 ++------- testcases/kernel/syscalls/poll/poll01.c | 5 ++--- testcases/kernel/syscalls/ppoll/ppoll01.c | 5 ++--- testcases/kernel/syscalls/prctl/prctl01.c | 2 +- testcases/kernel/syscalls/prctl/prctl02.c | 2 +- testcases/kernel/syscalls/pread/pread01.c | 5 ++--- testcases/kernel/syscalls/pread/pread02.c | 5 ++--- testcases/kernel/syscalls/pread/pread03.c | 5 ++--- testcases/kernel/syscalls/pselect/pselect01.c | 4 ++-- testcases/kernel/syscalls/ptrace/ptrace01.c | 2 +- testcases/kernel/syscalls/ptrace/ptrace02.c | 2 +- testcases/kernel/syscalls/ptrace/ptrace03.c | 2 +- testcases/kernel/syscalls/pwrite/pwrite01.c | 5 ++--- testcases/kernel/syscalls/pwrite/pwrite02.c | 5 ++--- testcases/kernel/syscalls/pwrite/pwrite03.c | 5 ++--- testcases/kernel/syscalls/quotactl/quotactl01.c | 8 ++------ testcases/kernel/syscalls/read/read01.c | 4 ++-- testcases/kernel/syscalls/readdir/readdir01.c | 4 ++-- testcases/kernel/syscalls/readdir/readdir02.c | 4 ++-- testcases/kernel/syscalls/readlink/readlink01.c | 9 ++++----- testcases/kernel/syscalls/readlink/readlink02.c | 4 ++-- testcases/kernel/syscalls/readlink/readlink03.c | 8 ++++---- .../kernel/syscalls/readlinkat/readlinkat01.c | 4 ++-- testcases/kernel/syscalls/reboot/reboot01.c | 4 ++-- testcases/kernel/syscalls/reboot/reboot02.c | 4 ++-- testcases/kernel/syscalls/recv/recv01.c | 7 +++---- testcases/kernel/syscalls/recvfrom/recvfrom01.c | 7 +++---- testcases/kernel/syscalls/recvmsg/recvmsg01.c | 7 +++---- .../syscalls/remap_file_pages/remap_file_pages01.c | 4 ++-- .../syscalls/remap_file_pages/remap_file_pages02.c | 4 ++-- testcases/kernel/syscalls/rename/rename01.c | 4 ++-- testcases/kernel/syscalls/rename/rename02.c | 4 ++-- testcases/kernel/syscalls/rename/rename03.c | 4 ++-- testcases/kernel/syscalls/rename/rename04.c | 4 ++-- testcases/kernel/syscalls/rename/rename05.c | 4 ++-- testcases/kernel/syscalls/rename/rename06.c | 4 ++-- testcases/kernel/syscalls/rename/rename07.c | 4 ++-- testcases/kernel/syscalls/rename/rename08.c | 2 +- testcases/kernel/syscalls/rename/rename09.c | 4 ++-- testcases/kernel/syscalls/rename/rename10.c | 4 ++-- testcases/kernel/syscalls/rename/rename12.c | 4 ++-- testcases/kernel/syscalls/rename/rename13.c | 4 ++-- testcases/kernel/syscalls/rename/rename14.c | 5 ++--- testcases/kernel/syscalls/renameat/renameat01.c | 4 ++-- testcases/kernel/syscalls/rmdir/rmdir01.c | 4 ++-- testcases/kernel/syscalls/rmdir/rmdir02.c | 2 +- testcases/kernel/syscalls/rmdir/rmdir03.c | 4 ++-- testcases/kernel/syscalls/rmdir/rmdir04.c | 4 ++-- testcases/kernel/syscalls/rmdir/rmdir05.c | 2 +- .../kernel/syscalls/rt_sigaction/rt_sigaction01.c | 8 ++------ .../kernel/syscalls/rt_sigaction/rt_sigaction02.c | 8 ++------ .../kernel/syscalls/rt_sigaction/rt_sigaction03.c | 8 ++------ .../syscalls/rt_sigprocmask/rt_sigprocmask01.c | 8 ++------ .../syscalls/rt_sigprocmask/rt_sigprocmask02.c | 8 ++------ .../syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c | 6 ++---- .../syscalls/rt_sigsuspend/rt_sigsuspend01.c | 8 ++------ testcases/kernel/syscalls/sbrk/sbrk01.c | 4 ++-- .../sched_get_priority_max01.c | 2 +- .../sched_get_priority_max02.c | 2 +- .../sched_get_priority_min01.c | 2 +- .../sched_get_priority_min02.c | 2 +- .../syscalls/sched_getparam/sched_getparam01.c | 4 ++-- .../syscalls/sched_getparam/sched_getparam02.c | 4 ++-- .../syscalls/sched_getparam/sched_getparam03.c | 1 - .../sched_rr_get_interval01.c | 4 ++-- .../sched_rr_get_interval02.c | 4 ++-- .../sched_rr_get_interval03.c | 3 +-- .../syscalls/sched_setparam/sched_setparam01.c | 4 ++-- .../syscalls/sched_setparam/sched_setparam02.c | 2 +- .../syscalls/sched_setparam/sched_setparam03.c | 4 ++-- .../syscalls/sched_setparam/sched_setparam04.c | 1 - .../syscalls/sched_setparam/sched_setparam05.c | 4 ++-- testcases/kernel/syscalls/select/select01.c | 4 ++-- testcases/kernel/syscalls/select/select02.c | 4 ++-- testcases/kernel/syscalls/select/select03.c | 4 ++-- .../syscalls/set_robust_list/set_robust_list01.c | 4 ++-- .../syscalls/set_tid_address/set_tid_address01.c | 8 ++------ .../syscalls/setdomainname/setdomainname01.c | 4 ++-- .../syscalls/setdomainname/setdomainname02.c | 1 - .../syscalls/setdomainname/setdomainname03.c | 5 ++--- testcases/kernel/syscalls/setgid/setgid01.c | 4 ++-- testcases/kernel/syscalls/setgroups/setgroups01.c | 4 ++-- testcases/kernel/syscalls/setgroups/setgroups02.c | 3 +-- testcases/kernel/syscalls/setgroups/setgroups03.c | 3 +-- testcases/kernel/syscalls/setgroups/setgroups04.c | 3 +-- .../kernel/syscalls/sethostname/sethostname02.c | 2 -- testcases/kernel/syscalls/setitimer/setitimer02.c | 1 - testcases/kernel/syscalls/setitimer/setitimer03.c | 1 - testcases/kernel/syscalls/setpgid/setpgid01.c | 4 ++-- testcases/kernel/syscalls/setpgrp/setpgrp01.c | 4 ++-- .../kernel/syscalls/setpriority/setpriority02.c | 1 - .../kernel/syscalls/setpriority/setpriority03.c | 1 - .../kernel/syscalls/setpriority/setpriority04.c | 1 - .../kernel/syscalls/setpriority/setpriority05.c | 1 - testcases/kernel/syscalls/setregid/setregid01.c | 6 +++--- testcases/kernel/syscalls/setregid/setregid02.c | 4 ++-- testcases/kernel/syscalls/setregid/setregid03.c | 4 ++-- testcases/kernel/syscalls/setregid/setregid04.c | 4 ++-- testcases/kernel/syscalls/setresuid/setresuid01.c | 5 ++--- testcases/kernel/syscalls/setreuid/setreuid01.c | 6 +++--- testcases/kernel/syscalls/setreuid/setreuid02.c | 4 ++-- .../kernel/syscalls/setsockopt/setsockopt01.c | 7 +++---- testcases/kernel/syscalls/setuid/setuid01.c | 4 ++-- testcases/kernel/syscalls/setuid/setuid02.c | 6 +++--- testcases/kernel/syscalls/sgetmask/sgetmask01.c | 8 ++------ .../kernel/syscalls/sigaltstack/sigaltstack01.c | 5 ++--- .../kernel/syscalls/sigaltstack/sigaltstack02.c | 5 ++--- testcases/kernel/syscalls/sighold/sighold02.c | 4 ++-- testcases/kernel/syscalls/signalfd4/signalfd4_01.c | 9 ++------- testcases/kernel/syscalls/signalfd4/signalfd4_02.c | 9 ++------- .../kernel/syscalls/sigpending/sigpending02.c | 4 ++-- .../kernel/syscalls/sigprocmask/sigprocmask01.c | 5 ++--- .../kernel/syscalls/sigsuspend/sigsuspend01.c | 5 ++--- testcases/kernel/syscalls/socket/socket01.c | 7 +++---- testcases/kernel/syscalls/socket/socket02.c | 9 ++------- testcases/kernel/syscalls/socket/socket03.c | 9 ++------- .../kernel/syscalls/socketcall/socketcall01.c | 4 ++-- .../kernel/syscalls/socketcall/socketcall02.c | 6 +++--- .../kernel/syscalls/socketcall/socketcall03.c | 6 +++--- .../kernel/syscalls/socketcall/socketcall04.c | 6 +++--- .../kernel/syscalls/socketpair/socketpair01.c | 6 +++--- .../kernel/syscalls/socketpair/socketpair02.c | 4 +--- testcases/kernel/syscalls/splice/splice01.c | 4 ++-- testcases/kernel/syscalls/splice/splice02.c | 8 ++------ testcases/kernel/syscalls/ssetmask/ssetmask01.c | 8 ++------ testcases/kernel/syscalls/stat/stat01.c | 9 ++++----- testcases/kernel/syscalls/stat/stat02.c | 9 ++++----- testcases/kernel/syscalls/stat/stat03.c | 3 +-- testcases/kernel/syscalls/stat/stat05.c | 4 ++-- testcases/kernel/syscalls/stat/stat06.c | 2 +- testcases/kernel/syscalls/statfs/statfs01.c | 4 ++-- testcases/kernel/syscalls/statvfs/statvfs01.c | 4 ++-- testcases/kernel/syscalls/stime/stime01.c | 5 ++--- testcases/kernel/syscalls/stime/stime02.c | 5 ++--- testcases/kernel/syscalls/swapoff/swapoff01.c | 4 ++-- testcases/kernel/syscalls/swapoff/swapoff02.c | 4 ++-- testcases/kernel/syscalls/swapon/swapon01.c | 4 ++-- testcases/kernel/syscalls/swapon/swapon02.c | 4 ++-- testcases/kernel/syscalls/swapon/swapon03.c | 4 ++-- testcases/kernel/syscalls/switch/endian_switch01.c | 4 ++-- testcases/kernel/syscalls/symlink/symlink02.c | 4 ++-- testcases/kernel/syscalls/symlink/symlink03.c | 9 ++++----- testcases/kernel/syscalls/symlink/symlink04.c | 9 ++++----- testcases/kernel/syscalls/symlink/symlink05.c | 9 ++++----- testcases/kernel/syscalls/symlinkat/symlinkat01.c | 4 ++-- testcases/kernel/syscalls/sync/sync01.c | 4 ++-- testcases/kernel/syscalls/sync/sync02.c | 5 ++--- .../syscalls/sync_file_range/sync_file_range01.c | 7 +------ testcases/kernel/syscalls/sysctl/sysctl01.c | 2 +- testcases/kernel/syscalls/sysctl/sysctl03.c | 2 +- testcases/kernel/syscalls/sysctl/sysctl04.c | 2 +- testcases/kernel/syscalls/sysctl/sysctl05.c | 2 +- testcases/kernel/syscalls/sysfs/sysfs01.c | 4 ++-- testcases/kernel/syscalls/sysfs/sysfs02.c | 4 ++-- testcases/kernel/syscalls/sysfs/sysfs03.c | 4 ++-- testcases/kernel/syscalls/sysfs/sysfs04.c | 4 ++-- testcases/kernel/syscalls/sysfs/sysfs05.c | 2 +- testcases/kernel/syscalls/sysfs/sysfs06.c | 2 +- testcases/kernel/syscalls/sysinfo/sysinfo01.c | 4 ++-- testcases/kernel/syscalls/sysinfo/sysinfo02.c | 4 ++-- testcases/kernel/syscalls/syslog/syslogtst.c | 4 ++-- testcases/kernel/syscalls/tee/tee01.c | 4 ++-- testcases/kernel/syscalls/time/time01.c | 4 ++-- testcases/kernel/syscalls/time/time02.c | 5 ++--- .../syscalls/timer_getoverrun/timer_getoverrun01.c | 8 ++------ .../syscalls/timer_gettime/timer_gettime01.c | 8 ++------ testcases/kernel/syscalls/timerfd/timerfd01.c | 4 ++-- testcases/kernel/syscalls/timerfd/timerfd02.c | 9 ++------- testcases/kernel/syscalls/timerfd/timerfd03.c | 9 ++------- testcases/kernel/syscalls/times/times01.c | 4 ++-- testcases/kernel/syscalls/tkill/tkill01.c | 8 ++------ testcases/kernel/syscalls/tkill/tkill02.c | 6 +----- testcases/kernel/syscalls/truncate/truncate01.c | 3 +-- testcases/kernel/syscalls/truncate/truncate02.c | 3 +-- testcases/kernel/syscalls/truncate/truncate03.c | 3 +-- testcases/kernel/syscalls/truncate/truncate04.c | 3 +-- testcases/kernel/syscalls/ulimit/ulimit01.c | 4 ++-- testcases/kernel/syscalls/umask/umask01.c | 4 ++-- testcases/kernel/syscalls/umount/umount01.c | 4 ++-- testcases/kernel/syscalls/umount/umount02.c | 4 +--- testcases/kernel/syscalls/umount/umount03.c | 4 +--- testcases/kernel/syscalls/uname/uname01.c | 4 ++-- testcases/kernel/syscalls/unlink/unlink05.c | 4 ++-- testcases/kernel/syscalls/unlink/unlink06.c | 4 ++-- testcases/kernel/syscalls/unlink/unlink07.c | 4 ++-- testcases/kernel/syscalls/unlink/unlink08.c | 4 ++-- testcases/kernel/syscalls/unlinkat/unlinkat01.c | 4 ++-- testcases/kernel/syscalls/unshare/unshare01.c | 6 ++---- testcases/kernel/syscalls/unshare/unshare02.c | 8 ++------ testcases/kernel/syscalls/ustat/ustat01.c | 1 - testcases/kernel/syscalls/ustat/ustat02.c | 4 ++-- testcases/kernel/syscalls/utime/utime01.c | 5 ++--- testcases/kernel/syscalls/utime/utime02.c | 5 ++--- testcases/kernel/syscalls/utime/utime03.c | 5 ++--- testcases/kernel/syscalls/utime/utime04.c | 5 ++--- testcases/kernel/syscalls/utime/utime05.c | 5 ++--- testcases/kernel/syscalls/utime/utime06.c | 5 ++--- testcases/kernel/syscalls/utimensat/utimensat01.c | 4 ++-- testcases/kernel/syscalls/utimes/utimes01.c | 6 ++---- testcases/kernel/syscalls/vfork/vfork01.c | 5 ++--- testcases/kernel/syscalls/vfork/vfork02.c | 5 ++--- testcases/kernel/syscalls/vhangup/vhangup01.c | 1 - testcases/kernel/syscalls/vmsplice/vmsplice01.c | 4 ++-- testcases/kernel/syscalls/wait/wait02.c | 4 ++-- testcases/kernel/syscalls/waitid/waitid01.c | 8 ++------ testcases/kernel/syscalls/waitid/waitid02.c | 8 ++------ testcases/kernel/syscalls/waitpid/waitpid04.c | 1 - testcases/kernel/syscalls/write/write01.c | 4 ++-- testcases/kernel/syscalls/write/write03.c | 1 - testcases/kernel/syscalls/write/write04.c | 1 - testcases/kernel/syscalls/write/write05.c | 5 ++--- testcases/kernel/syscalls/writev/writev03.c | 1 - testcases/kernel/syscalls/writev/writev04.c | 1 - testcases/kernel/syscalls/writev/writev05.c | 1 - testcases/kernel/syscalls/writev/writev06.c | 1 - 491 files changed, 905 insertions(+), 1293 deletions(-) diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c index 6019b64..ba24b4a 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task01.c @@ -41,7 +41,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c index a37e249..4680406 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task02.c @@ -44,7 +44,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c index 76d17f1..41cfa41 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task03.c @@ -45,7 +45,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c b/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c index 1bbaced..9a7da9b 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_def_task04.c @@ -44,7 +44,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test01.c b/testcases/kernel/controllers/cpuctl/cpuctl_test01.c index 6e6cd11..7da3f24 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test01.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test01.c @@ -45,7 +45,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test02.c b/testcases/kernel/controllers/cpuctl/cpuctl_test02.c index 6794833..3669a5d 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test02.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test02.c @@ -44,7 +44,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test03.c b/testcases/kernel/controllers/cpuctl/cpuctl_test03.c index 0b1d559..ca9f4f9 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test03.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test03.c @@ -45,7 +45,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/cpuctl/cpuctl_test04.c b/testcases/kernel/controllers/cpuctl/cpuctl_test04.c index c2182b7..c332f29 100644 --- a/testcases/kernel/controllers/cpuctl/cpuctl_test04.c +++ b/testcases/kernel/controllers/cpuctl/cpuctl_test04.c @@ -44,7 +44,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <unistd.h> #include <math.h> #include <signal.h> diff --git a/testcases/kernel/controllers/memctl/memctl_test01.c b/testcases/kernel/controllers/memctl/memctl_test01.c index fd3c5e2..ba23f20 100644 --- a/testcases/kernel/controllers/memctl/memctl_test01.c +++ b/testcases/kernel/controllers/memctl/memctl_test01.c @@ -42,7 +42,6 @@ /* */ /******************************************************************************/ -/* Standard Include Files */ #include <stdio.h> #include <string.h> #include <unistd.h> diff --git a/testcases/kernel/mem/mmapstress/mmap-corruption01.c b/testcases/kernel/mem/mmapstress/mmap-corruption01.c index 0539cd4..432c0d2 100644 --- a/testcases/kernel/mem/mmapstress/mmap-corruption01.c +++ b/testcases/kernel/mem/mmapstress/mmap-corruption01.c @@ -51,7 +51,6 @@ #include <string.h> #include <signal.h> -/* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" diff --git a/testcases/kernel/syscalls/accept/accept01.c b/testcases/kernel/syscalls/accept/accept01.c index 30bc166..453fe00 100644 --- a/testcases/kernel/syscalls/accept/accept01.c +++ b/testcases/kernel/syscalls/accept/accept01.c @@ -56,7 +56,7 @@ #include "test.h" #include "usctest.h" -char *TCID = "accept01"; /* Test program identifier. */ +char *TCID = "accept01"; int testno; int s; /* socket descriptor */ @@ -99,7 +99,7 @@ struct test_case_t { /* test case structure */ PF_INET, SOCK_DGRAM, 0, (struct sockaddr *)&fsin1, &sinlen, -1, EOPNOTSUPP, setup1, cleanup1, "UDP accept"},}; -int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]); /* Total number of test cases. */ +int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]); int exp_enos[] = { EBADF, ENOTSOCK, EINVAL, EOPNOTSUPP, 0 }; @@ -108,7 +108,6 @@ int main(int ac, char *av[]) int lc; char *msg; - /* Parse standard options given to run the test. */ if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); @@ -145,9 +144,8 @@ int main(int ac, char *av[]) void setup(void) { - TEST_PAUSE; /* if -P option specified */ + TEST_PAUSE; - /* set up the expected error numbers for -e option */ TEST_EXP_ENOS(exp_enos); /* initialize local sockaddr */ diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c index 526be6e..6e6f017 100644 --- a/testcases/kernel/syscalls/accept4/accept4_01.c +++ b/testcases/kernel/syscalls/accept4/accept4_01.c @@ -79,9 +79,8 @@ #define USE_SOCKETCALL 1 #endif -/* Global Variables */ -char *TCID = "accept04_01"; /* test program identifier. */ -int TST_TOTAL = 1; /* total number of tests in this file. */ +char *TCID = "accept04_01"; +int TST_TOTAL = 1; /* Extern Global Functions */ /******************************************************************************/ diff --git a/testcases/kernel/syscalls/access/access01.c b/testcases/kernel/syscalls/access/access01.c index 648f45b..f239f3f 100644 --- a/testcases/kernel/syscalls/access/access01.c +++ b/testcases/kernel/syscalls/access/access01.c @@ -130,8 +130,8 @@ void setup(); void cleanup(); -char *TCID = "access01"; /* Test program identifier. */ -int TST_TOTAL = 4; /* Total number of test cases. */ +char *TCID = "access01"; +int TST_TOTAL = 4; char Fname[255]; diff --git a/testcases/kernel/syscalls/access/access02.c b/testcases/kernel/syscalls/access/access02.c index 61cdc43..55ad73a 100644 --- a/testcases/kernel/syscalls/access/access02.c +++ b/testcases/kernel/syscalls/access/access02.c @@ -90,8 +90,8 @@ #define FILE_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) #define EXE_MODE 0777 -char *TCID = "access02"; /* Test program identifier. */ -int TST_TOTAL = 4; /* Total number of test cases. */ +char *TCID = "access02"; +int TST_TOTAL = 4; int fd1, fd2, fd4; /* file descriptor for testfile(s) */ char nobody_uid[] = "nobody"; struct passwd *ltpuser; diff --git a/testcases/kernel/syscalls/access/access03.c b/testcases/kernel/syscalls/access/access03.c index 540f7bf..145ec74 100644 --- a/testcases/kernel/syscalls/access/access03.c +++ b/testcases/kernel/syscalls/access/access03.c @@ -109,8 +109,8 @@ static void setup(void); static void cleanup(void); -char *TCID = "access03"; /* Test program identifier. */ -int TST_TOTAL = 8; /* Total number of test cases. */ +char *TCID = "access03"; +int TST_TOTAL = 8; int exp_enos[] = { EFAULT, 0 }; /* List must end with 0 */ diff --git a/testcases/kernel/syscalls/access/access04.c b/testcases/kernel/syscalls/access/access04.c index 5cfae45..6da846d 100644 --- a/testcases/kernel/syscalls/access/access04.c +++ b/testcases/kernel/syscalls/access/access04.c @@ -84,8 +84,8 @@ #define DIR_MODE S_IRWXU | S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP #define FILE_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH -char *TCID = "access04"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "access04"; +int TST_TOTAL = 1; char nobody_uid[] = "nobody"; struct passwd *ltpuser; diff --git a/testcases/kernel/syscalls/access/access05.c b/testcases/kernel/syscalls/access/access05.c index f47d7fc..20b71d8 100644 --- a/testcases/kernel/syscalls/access/access05.c +++ b/testcases/kernel/syscalls/access/access05.c @@ -130,7 +130,7 @@ struct test_case_t { /* test case structure */ "", W_OK, ENOENT, NULL}, { Longpathname, R_OK, ENAMETOOLONG, longpath_setup},}; -char *TCID = "access05"; /* Test program identifier. */ +char *TCID = "access05"; int TST_TOTAL = sizeof(test_cases) / sizeof(*test_cases); int exp_enos[] = { EACCES, EFAULT, EINVAL, ENOENT, ENAMETOOLONG, 0 }; diff --git a/testcases/kernel/syscalls/acct/acct02.c b/testcases/kernel/syscalls/acct/acct02.c index ff3900d..f1c7bf6 100644 --- a/testcases/kernel/syscalls/acct/acct02.c +++ b/testcases/kernel/syscalls/acct/acct02.c @@ -50,8 +50,8 @@ #define FAILED 0 #define PASSED 1 -char *TCID = "acct02"; /* Test program identifier. */ -int TST_TOTAL = 2; /* Total number of test cases. */ +char *TCID = "acct02"; +int TST_TOTAL = 2; /**************/ char fname[80]; diff --git a/testcases/kernel/syscalls/add_key/add_key01.c b/testcases/kernel/syscalls/add_key/add_key01.c index c31255f..a4c5d2e 100644 --- a/testcases/kernel/syscalls/add_key/add_key01.c +++ b/testcases/kernel/syscalls/add_key/add_key01.c @@ -42,14 +42,12 @@ #include <errno.h> #include <linux/keyctl.h> -/* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" -/* Global Variables */ -char *TCID = "add_key01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* total number of tests in this file. */ +char *TCID = "add_key01"; +int TST_TOTAL = 1; /* Extern Global Functions */ /******************************************************************************/ diff --git a/testcases/kernel/syscalls/add_key/add_key02.c b/testcases/kernel/syscalls/add_key/add_key02.c index c394722..5e95d83 100644 --- a/testcases/kernel/syscalls/add_key/add_key02.c +++ b/testcases/kernel/syscalls/add_key/add_key02.c @@ -42,17 +42,13 @@ #include <errno.h> #include <linux/keyctl.h> -/* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" -/* Extern Global Variables */ - -/* Global Variables */ -char *TCID = "add_key02"; /* Test program identifier. */ +char *TCID = "add_key02"; int testno; -int TST_TOTAL = 1; /* total number of tests in this file. */ +int TST_TOTAL = 1; /* Extern Global Functions */ /******************************************************************************/ diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex01.c b/testcases/kernel/syscalls/adjtimex/adjtimex01.c index 51d5d2a..000a979 100644 --- a/testcases/kernel/syscalls/adjtimex/adjtimex01.c +++ b/testcases/kernel/syscalls/adjtimex/adjtimex01.c @@ -80,8 +80,8 @@ static void setup(); static void cleanup(); -char *TCID = "adjtimex01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "adjtimex01"; +int TST_TOTAL = 1; static struct timex tim_save; diff --git a/testcases/kernel/syscalls/adjtimex/adjtimex02.c b/testcases/kernel/syscalls/adjtimex/adjtimex02.c index aac1e18..437dd95 100644 --- a/testcases/kernel/syscalls/adjtimex/adjtimex02.c +++ b/testcases/kernel/syscalls/adjtimex/adjtimex02.c @@ -105,7 +105,7 @@ static int setup6(); static void cleanup(); static void cleanup6(); -char *TCID = "adjtimex02"; /* Test program identifier. */ +char *TCID = "adjtimex02"; static int hz; /* HZ from sysconf */ diff --git a/testcases/kernel/syscalls/alarm/alarm01.c b/testcases/kernel/syscalls/alarm/alarm01.c index 085c025..e69f4b1 100644 --- a/testcases/kernel/syscalls/alarm/alarm01.c +++ b/testcases/kernel/syscalls/alarm/alarm01.c @@ -118,8 +118,8 @@ void setup(); void cleanup(); -char *TCID = "alarm01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "alarm01"; +int TST_TOTAL = 1; int main(int ac, char **av) { diff --git a/testcases/kernel/syscalls/alarm/alarm02.c b/testcases/kernel/syscalls/alarm/alarm02.c index 28971a6..b3044d8 100644 --- a/testcases/kernel/syscalls/alarm/alarm02.c +++ b/testcases/kernel/syscalls/alarm/alarm02.c @@ -97,8 +97,8 @@ void setup(); void cleanup(); void alarm_received(); -char *TCID = "alarm02"; /* Test program identifier. */ -int TST_TOTAL = 3; /* Total number of test cases. */ +char *TCID = "alarm02"; +int TST_TOTAL = 3; int received_alarm = 0; /* Indicates a SIGALRM was received */ diff --git a/testcases/kernel/syscalls/alarm/alarm03.c b/testcases/kernel/syscalls/alarm/alarm03.c index 552a020..ed3a7a4 100644 --- a/testcases/kernel/syscalls/alarm/alarm03.c +++ b/testcases/kernel/syscalls/alarm/alarm03.c @@ -104,8 +104,8 @@ void setup(); void cleanup(); void trapper(); -char *TCID = "alarm03"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "alarm03"; +int TST_TOTAL = 1; int main(int ac, char **av) { diff --git a/testcases/kernel/syscalls/alarm/alarm05.c b/testcases/kernel/syscalls/alarm/alarm05.c index 9df1458..cb4a69f 100644 --- a/testcases/kernel/syscalls/alarm/alarm05.c +++ b/testcases/kernel/syscalls/alarm/alarm05.c @@ -76,8 +76,8 @@ #include "test.h" #include "usctest.h" -char *TCID = "alarm05"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "alarm05"; +int TST_TOTAL = 1; int alarms_received = 0; /* flag to indicate SIGALRM received or not */ void setup(); /* Main setup function of test */ diff --git a/testcases/kernel/syscalls/asyncio/asyncio02.c b/testcases/kernel/syscalls/asyncio/asyncio02.c index cbdffa8..209c958 100644 --- a/testcases/kernel/syscalls/asyncio/asyncio02.c +++ b/testcases/kernel/syscalls/asyncio/asyncio02.c @@ -119,8 +119,8 @@ void setup(); void cleanup(); int testrun(int flag, int bytes, int ti); -char *TCID = "asyncio02"; /* Test program identifier. */ -int TST_TOTAL = 6; /* Total number of test cases. */ +char *TCID = "asyncio02"; +int TST_TOTAL = 6; int exp_enos[] = { 0 }; /* Array of expected errnos */ diff --git a/testcases/kernel/syscalls/bind/bind01.c b/testcases/kernel/syscalls/bind/bind01.c index 05240f7..ed02299 100644 --- a/testcases/kernel/syscalls/bind/bind01.c +++ b/testcases/kernel/syscalls/bind/bind01.c @@ -54,7 +54,7 @@ #include "test.h" #include "usctest.h" -char *TCID = "bind01"; /* Test program identifier. */ +char *TCID = "bind01"; int testno; int s; /* socket descriptor */ @@ -102,7 +102,7 @@ struct test_case_t { /* test case structure */ "non-local address"} ,}; -int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]); /* Total number of test cases. */ +int TST_TOTAL = sizeof(tdat) / sizeof(tdat[0]); int exp_enos[] = { EFAULT, EINVAL, ENOTSOCK, EADDRINUSE, EADDRNOTAVAIL, 0 }; @@ -111,7 +111,6 @@ int main(int argc, char *argv[]) int lc; char *msg; - /* Parse standard options given to run the test. */ msg = parse_opts(argc, argv, NULL, NULL); if (msg != NULL) { tst_brkm(TBROK, 0, "OPTION PARSING ERROR - %s", msg); diff --git a/testcases/kernel/syscalls/bind/bind02.c b/testcases/kernel/syscalls/bind/bind02.c index e7c6337..f74ab5b 100644 --- a/testcases/kernel/syscalls/bind/bind02.c +++ b/testcases/kernel/syscalls/bind/bind02.c @@ -58,7 +58,7 @@ #include "test.h" #include "usctest.h" -char *TCID = "bind02"; /* Test program identifier. */ +char *TCID = "bind02"; int testno; int TST_TOTAL = 1; diff --git a/testcases/kernel/syscalls/brk/brk01.c b/testcases/kernel/syscalls/brk/brk01.c index 229de0a..928717b 100644 --- a/testcases/kernel/syscalls/brk/brk01.c +++ b/testcases/kernel/syscalls/brk/brk01.c @@ -116,8 +116,8 @@ void cleanup(); #define MAX_SIZE_LC 1000 /* loop count test will reach max size */ -char *TCID = "brk01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "brk01"; +int TST_TOTAL = 1; long Max_brk_byte_size; long Beg_brk_val; diff --git a/testcases/kernel/syscalls/cacheflush/cacheflush01.c b/testcases/kernel/syscalls/cacheflush/cacheflush01.c index cb3fb5a..d4d353f 100644 --- a/testcases/kernel/syscalls/cacheflush/cacheflush01.c +++ b/testcases/kernel/syscalls/cacheflush/cacheflush01.c @@ -44,7 +44,6 @@ #include <stdlib.h> #include <errno.h> -/* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" @@ -65,11 +64,8 @@ #endif #endif -/* Extern Global Variables */ - -/* Global Variables */ -char *TCID = "cacheflush01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* total number of tests in this file. */ +char *TCID = "cacheflush01"; +int TST_TOTAL = 1; /* Extern Global Functions */ /******************************************************************************/ diff --git a/testcases/kernel/syscalls/capget/capget01.c b/testcases/kernel/syscalls/capget/capget01.c index 0de68c0..cd4057f 100644 --- a/testcases/kernel/syscalls/capget/capget01.c +++ b/testcases/kernel/syscalls/capget/capget01.c @@ -73,8 +73,8 @@ static void setup(); static void cleanup(); -char *TCID = "capget01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "capget01"; +int TST_TOTAL = 1; static struct __user_cap_header_struct header; /* cap_user_header_t is a pointer to __user_cap_header_struct */ diff --git a/testcases/kernel/syscalls/capget/capget02.c b/testcases/kernel/syscalls/capget/capget02.c index d63f66c..daa654f 100644 --- a/testcases/kernel/syscalls/capget/capget02.c +++ b/testcases/kernel/syscalls/capget/capget02.c @@ -94,7 +94,7 @@ static void setup(); static void cleanup(); static void test_setup(int); -char *TCID = "capget02"; /* Test program identifier. */ +char *TCID = "capget02"; static int exp_enos[] = { EFAULT, EINVAL, ESRCH, 0 }; static struct __user_cap_header_struct header; diff --git a/testcases/kernel/syscalls/capset/capset01.c b/testcases/kernel/syscalls/capset/capset01.c index c367865..79d0d9f 100644 --- a/testcases/kernel/syscalls/capset/capset01.c +++ b/testcases/kernel/syscalls/capset/capset01.c @@ -86,8 +86,8 @@ static void setup(); static void cleanup(); -char *TCID = "capset01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "capset01"; +int TST_TOTAL = 1; static int exp_enos[] = { EFAULT, EINVAL, EPERM, 0 }; static struct __user_cap_header_struct header; /* cap_user_header_t is a pointer diff --git a/testcases/kernel/syscalls/capset/capset02.c b/testcases/kernel/syscalls/capset/capset02.c index 0c3f911..307d990 100644 --- a/testcases/kernel/syscalls/capset/capset02.c +++ b/testcases/kernel/syscalls/capset/capset02.c @@ -104,7 +104,7 @@ static void child_func(); static pid_t child_pid = -1; -char *TCID = "capset02"; /* Test program identifier. */ +char *TCID = "capset02"; static int exp_enos[] = { EFAULT, EINVAL, EPERM, 0 }; static struct __user_cap_header_struct header; diff --git a/testcases/kernel/syscalls/chdir/chdir01.c b/testcases/kernel/syscalls/chdir/chdir01.c index d69f42a..04fb8b4 100644 --- a/testcases/kernel/syscalls/chdir/chdir01.c +++ b/testcases/kernel/syscalls/chdir/chdir01.c @@ -58,8 +58,8 @@ #include "usctest.h" #include "safe_macros.h" -char *TCID = "chdir01"; /* Test program identifier */ -int TST_TOTAL = 1; /* Total number of test cases */ +char *TCID = "chdir01"; +int TST_TOTAL = 1; int exp_enos[] = { ENOTDIR, 0 }; diff --git a/testcases/kernel/syscalls/chdir/chdir02.c b/testcases/kernel/syscalls/chdir/chdir02.c index f119f75..3ad0921 100644 --- a/testcases/kernel/syscalls/chdir/chdir02.c +++ b/testcases/kernel/syscalls/chdir/chdir02.c @@ -118,8 +118,8 @@ void setup(); void cleanup(); -char *TCID = "chdir02"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chdir02"; +int TST_TOTAL = 1; int exp_enos[] = { 0, 0 }; diff --git a/testcases/kernel/syscalls/chmod/chmod02.c b/testcases/kernel/syscalls/chmod/chmod02.c index 4a80db1..242cbd3 100644 --- a/testcases/kernel/syscalls/chmod/chmod02.c +++ b/testcases/kernel/syscalls/chmod/chmod02.c @@ -121,8 +121,8 @@ void setup(); void cleanup(); -char *TCID = "chmod02"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chmod02"; +int TST_TOTAL = 1; char fname[255]; char *buf = "file contents\n"; diff --git a/testcases/kernel/syscalls/chmod/chmod03.c b/testcases/kernel/syscalls/chmod/chmod03.c index 4275e9b..f7df56e 100644 --- a/testcases/kernel/syscalls/chmod/chmod03.c +++ b/testcases/kernel/syscalls/chmod/chmod03.c @@ -89,8 +89,8 @@ */ #define TESTFILE "testfile" -char *TCID = "chmod03"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chmod03"; +int TST_TOTAL = 1; char nobody_uid[] = "nobody"; struct passwd *ltpuser; diff --git a/testcases/kernel/syscalls/chmod/chmod04.c b/testcases/kernel/syscalls/chmod/chmod04.c index 496c724..228a43f 100644 --- a/testcases/kernel/syscalls/chmod/chmod04.c +++ b/testcases/kernel/syscalls/chmod/chmod04.c @@ -89,13 +89,13 @@ */ #define TESTDIR "testdir_4" -char *TCID = "chmod04"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chmod04"; +int TST_TOTAL = 1; char nobody_uid[] = "nobody"; struct passwd *ltpuser; -void setup(); /* Setup function for the test */ -void cleanup(); /* Cleanup function for the test */ +void setup(); +void cleanup(); int main(int ac, char **av) { diff --git a/testcases/kernel/syscalls/chmod/chmod05.c b/testcases/kernel/syscalls/chmod/chmod05.c index 6696515..93aeec4 100644 --- a/testcases/kernel/syscalls/chmod/chmod05.c +++ b/testcases/kernel/syscalls/chmod/chmod05.c @@ -110,8 +110,8 @@ #define PERMS (mode_t)(MODE_RWX | DIR_MODE) #define TESTDIR "testdir" -char *TCID = "chmod05"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chmod05"; +int TST_TOTAL = 1; void setup(); /* Main setup function for test */ void cleanup(); /* Main cleanup function for test */ diff --git a/testcases/kernel/syscalls/chmod/chmod07.c b/testcases/kernel/syscalls/chmod/chmod07.c index a898671..ee89290 100644 --- a/testcases/kernel/syscalls/chmod/chmod07.c +++ b/testcases/kernel/syscalls/chmod/chmod07.c @@ -92,8 +92,8 @@ */ #define TESTFILE "testfile" -char *TCID = "chmod07"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chmod07"; +int TST_TOTAL = 1; void setup(); /* Main setup function for the test */ void cleanup(); /* Main cleanup function for the test */ diff --git a/testcases/kernel/syscalls/chown/chown01.c b/testcases/kernel/syscalls/chown/chown01.c index 9139ec4..50b9ea5 100644 --- a/testcases/kernel/syscalls/chown/chown01.c +++ b/testcases/kernel/syscalls/chown/chown01.c @@ -120,8 +120,8 @@ void setup(); void cleanup(); -char *TCID = "chown01"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ +char *TCID = "chown01"; +int TST_TOTAL = 1; int exp_enos[] = { 0, 0 }; diff --git a/testcases/kernel/syscalls/chown/chown02.c b/testcases/kernel/syscalls/chown/chown02.c index 7ca8bf2..aa8ec15 100644 --- a/testcases/kernel/syscalls/chown/chown02.c +++ b/testcases/kernel/syscalls/chown/chown02.c @@ -87,7 +87,7 @@ #define TESTFILE1 "testfile1" #define TESTFILE2 "testfile2" -char *TCID = "chown02"; /* Test program identifier. */ +char *TCID = "chown02"; int setup1(); /* Test specific setup functions */ int setup2(); @@ -122,7 +122,6 @@ int main(int ac, char **av) int test_flag; /* test condition specific flag variable */ char *file_name; /* ptr. for test file name */ - /* Parse standard options given to run the test. */ if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); diff --git a/testcases/kernel/syscalls/chown/chown03.c b/testcases/kernel/syscalls/chown/chown03.c index cb8e8e0..190a2a7 100644 --- a/testcases/kernel/syscalls/chown/chown03.c +++ b/testcases/kernel/syscalls/chown/chown03.c @@ -87,7 +87,7 @@ #define NEW_PERMS (S_IFREG|S_IRWXU|S_IRWXG|S_ISUID|S_ISGID) #define TESTFILE "testfile" -char *TCID = "chown03"; /* Test program identifier. */ +char *TCID = "chown03"; int TST_TOTAL = 1; /* Total number of test conditions */ char nobody_uid[] = "nobody"; struct passwd *ltpuser; diff --git a/testcases/kernel/syscalls/clock_getres/clock_getres01.c b/testcases/kernel/syscalls/clock_getres/clock_getres01.c index 80e7ce5..0fb5df4 100644 --- a/testcases/kernel/syscalls/clock_getres/clock_getres01.c +++ b/testcases/kernel/syscalls/clock_getres/clock_getres01.c @@ -57,17 +57,13 @@ #include "config.h" #include "include_j_h.h" -/* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" -/* Extern Global Variables */ - -/* Global Variables */ -char *TCID = "clock_getres01"; /* Test program identifier. */ +char *TCID = "clock_getres01"; int testno; -int TST_TOTAL = 1; /* total number of tests in this file. */ +int TST_TOTAL = 1; /* Extern Global Functions */ /******************************************************************************/ diff --git a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c index b78041e..95a7e7c 100644 --- a/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c +++ b/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c @@ -57,17 +57,13 @@ #include "../utils/common_j_h.c" #include "../utils/include_j_h.h" -/* Harness Specific Include Files. */ #include "test.h" #include "usctest.h" #include "linux_syscall_numbers.h" -/* Extern Global Variables */ - -/* Global Variables */ -char *TCID = "clock_nanosleep01"; /* Test program identifier. */ +char *TCID = "clock_nanosleep01"; int testno; -int TST_TOTAL = 1; /* total number of tests in this file. */ +int TST_TOTAL = 1; struct sigaction act; /* diff --git a/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c b/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c index e210a16..8676569 100644 --- a/testcases/kernel/syscalls/clock_nanosleep2/clock_nanosleep2_01.c +++ b/testcases/kernel/syscalls/clock_nanosleep2/clock_nanoslee... [truncated message content] |
From: Cyril H. <su...@li...> - 2013-04-04 15:21:32
|
The branch, master, has been updated via c515be23194f988533259dff450ff8da0c7f6ae5 (commit) via be0d9d6a42bee938fbda50685e578a73ca75116d (commit) via 2c8bb90b91cc35edba900f2fd2e777ce0722497b (commit) via 750a46adf9c8bd5ba986adfc32b3775c20e74c4d (commit) from 74500f984c2e2b926650367f6a55f3ee9b33c617 (commit) - Log ----------------------------------------------------------------- commit c515be23194f988533259dff450ff8da0c7f6ae5 Author: Cyril Hrubis <ch...@su...> Date: Thu Apr 4 16:46:39 2013 +0200 testcases/.../syscalls/getgroups03: Cleanup. * Remove useless commets * Shuffle the code a little to make it more readable Signed-off-by: Cyril Hrubis <ch...@su...> commit be0d9d6a42bee938fbda50685e578a73ca75116d Author: Cyril Hrubis <ch...@su...> Date: Thu Apr 4 15:57:18 2013 +0200 testcases/.../syscalls/getgroups{02,04}: Remove. Each of these testcases do one of the tests from getgroups01. There is no point in cleaning and fixing their code. Signed-off-by: Cyril Hrubis <ch...@su...> commit 2c8bb90b91cc35edba900f2fd2e777ce0722497b Author: Cyril Hrubis <ch...@su...> Date: Thu Apr 4 15:45:02 2013 +0200 testcases/.../syscalls/getgroups01: Fix. Fix the memset() and memcmp() sizes to match the array sizes. Signed-off-by: Cyril Hrubis <ch...@su...> commit 750a46adf9c8bd5ba986adfc32b3775c20e74c4d Author: Cyril Hrubis <ch...@su...> Date: Thu Mar 14 15:36:51 2013 +0100 testcases/.../syscalls/getgroups01: Cleanup. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/getgroups/getgroups01.c | 124 +++++-------- testcases/kernel/syscalls/getgroups/getgroups02.c | 176 ------------------ testcases/kernel/syscalls/getgroups/getgroups03.c | 198 ++++++++------------- testcases/kernel/syscalls/getgroups/getgroups04.c | 170 ------------------ 4 files changed, 122 insertions(+), 546 deletions(-) delete mode 100644 testcases/kernel/syscalls/getgroups/getgroups02.c delete mode 100644 testcases/kernel/syscalls/getgroups/getgroups04.c diff --git a/testcases/kernel/syscalls/getgroups/getgroups01.c b/testcases/kernel/syscalls/getgroups/getgroups01.c index 75f2f63..1d58109 100644 --- a/testcases/kernel/syscalls/getgroups/getgroups01.c +++ b/testcases/kernel/syscalls/getgroups/getgroups01.c @@ -28,52 +28,22 @@ * For further information regarding this notice, see: * * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - * */ -/* $Id: getgroups01.c,v 1.7 2009/08/28 13:03:01 vapier Exp $ */ -/*********************************************************************** -TEST IDENTIFIER: getgroups01 : Getgroups system call critical test - -PARENT DOCUMENT: ggrtds01: Getgroups system call test design spec - -AUTHOR: Barrie Kletscher - Rewrote : 11-92 by Richard Logan - -CO-PILOT: Dave Baumgartner - -TEST ITEMS: - 1. Check to see if getgroups(-1, gidset) fails and sets errno to EINVAL - 2. Check to see if getgroups(0, gidset) does not return -1 and gidset is - not modified. - 3. Check to see if getgroups(x, gigset) fails and sets errno to EINVAL, - where x is one less then what is returned by getgroups(0, gidset). - 4. Check to see if getgroups() succeeds and gidset contains - group id returned from getgid(). - -INPUT SPECIFICATIONS: - NONE - -OUTPUT SPECIFICATIONS: - Standard tst_res output format - -ENVIRONMENTAL NEEDS: - NONE. - -SPECIAL PROCEDURAL REQUIREMENTS: - None - -INTERCASE DEPENDENCIES: - Test case #3 depends on test case #2. - -DETAILED DESCRIPTION: - Set up the signal handling capabilities. - execute tests - exit -BUGS: - None known. - -************************************************************/ +/* + AUTHOR: Barrie Kletscher + Rewrote : 11-92 by Richard Logan + CO-PILOT: Dave Baumgartner + + TEST ITEMS: + 1. Check to see if getgroups(-1, gidset) fails and sets errno to EINVAL + 2. Check to see if getgroups(0, gidset) does not return -1 and gidset is + not modified. + 3. Check to see if getgroups(x, gigset) fails and sets errno to EINVAL, + where x is one less then what is returned by getgroups(0, gidset). + 4. Check to see if getgroups() succeeds and gidset contains + group id returned from getgid(). +*/ #include <unistd.h> #include <signal.h> @@ -85,28 +55,27 @@ BUGS: #include "test.h" #include "usctest.h" -void setup(); -void cleanup(); +static void setup(void); +static void cleanup(void); -char *TCID = "getgroups01"; /* Test program identifier. */ -int TST_TOTAL = 4; /* Total number of test cases. */ +char *TCID = "getgroups01"; +int TST_TOTAL = 4; -gid_t gidset[NGROUPS]; /* storage for all group ids */ -gid_t cmpset[NGROUPS]; +static gid_t gidset[NGROUPS]; +static gid_t cmpset[NGROUPS]; int main(int ac, char **av) { int lc; - char *ptr; /* message returned from parse_opts */ - + char *msg; gid_t group; - int i; - int entries; /* number of group entries */ + int entries; initgroups("root", 0); - if ((ptr = parse_opts(ac, av, NULL, NULL)) != NULL) - tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", ptr); + + if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) + tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); setup(); @@ -116,9 +85,9 @@ int main(int ac, char **av) TEST(getgroups(-1, gidset)); - if (TEST_RETURN == 0) + if (TEST_RETURN == 0) { tst_resm(TFAIL, "getgroups succeeded unexpectedly"); - else if (STD_FUNCTIONAL_TEST) { + } else if (STD_FUNCTIONAL_TEST) { if (errno == EINVAL) tst_resm(TPASS, "getgroups failed as expected with EINVAL"); @@ -132,15 +101,14 @@ int main(int ac, char **av) * return and the the gidset array is not modified. * This is a POSIX special case. */ - - memset(gidset, 052, NGROUPS); - memset(cmpset, 052, NGROUPS); + memset(gidset, 052, NGROUPS * sizeof(gid_t)); + memset(cmpset, 052, NGROUPS * sizeof(gid_t)); TEST(getgroups(0, gidset)); - if (TEST_RETURN == -1) - tst_resm(TFAIL | TTERRNO, "getgroups failed"); - else if (STD_FUNCTIONAL_TEST) { - if (memcmp(cmpset, gidset, NGROUPS) != 0) + if (TEST_RETURN == -1) { + tst_resm(TFAIL | TTERRNO, "getgroups failed unexpectedly"); + } else if (STD_FUNCTIONAL_TEST) { + if (memcmp(cmpset, gidset, NGROUPS * sizeof(gid_t)) != 0) tst_resm(TFAIL, "getgroups modified the gidset array"); else @@ -153,12 +121,11 @@ int main(int ac, char **av) * Check to see that is -1 is returned and errno is set to * EINVAL when ngroups is not big enough to hold all groups. */ - - if (TEST_RETURN <= 1) + if (TEST_RETURN <= 1) { tst_resm(TCONF, "getgroups returned %ld; unable to test that using ngrps >=1 but less than number of grps", TEST_RETURN); - else { + } else { TEST(getgroups(TEST_RETURN - 1, gidset)); if (TEST_RETURN == -1) { if (STD_FUNCTIONAL_TEST) { @@ -171,21 +138,22 @@ int main(int ac, char **av) "getgroups didn't fail " "with EINVAL"); } - } else + } else { tst_resm(TFAIL, "getgroups succeeded unexpectedly with %ld", TEST_RETURN); + } } TEST(getgroups(NGROUPS, gidset)); - if ((entries = TEST_RETURN) == -1) + if ((entries = TEST_RETURN) == -1) { tst_resm(TFAIL | TTERRNO, "getgroups failed unexpectedly"); - else if (STD_FUNCTIONAL_TEST) { + } else if (STD_FUNCTIONAL_TEST) { group = getgid(); - for (i = 0; i < entries; i++) + for (i = 0; i < entries; i++) { if (gidset[i] == group) { tst_resm(TPASS, "getgroups(NGROUPS,gidset) " @@ -194,30 +162,30 @@ int main(int ac, char **av) entries, group); break; } + } - if (i == entries) + if (i == entries) { tst_resm(TFAIL, "getgroups(NGROUPS,gidset) ret %d, does " "not contain gid %d (from getgid)", entries, group); + } } } - cleanup(); + cleanup(); tst_exit(); } -void setup() +static void setup(void) { - tst_sig(FORK, DEF_HANDLER, cleanup); TEST_PAUSE; - } -void cleanup() +static void cleanup(void) { TEST_CLEANUP; } diff --git a/testcases/kernel/syscalls/getgroups/getgroups02.c b/testcases/kernel/syscalls/getgroups/getgroups02.c deleted file mode 100644 index 977996c..0000000 --- a/testcases/kernel/syscalls/getgroups/getgroups02.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - * - */ -/* $Id: getgroups02.c,v 1.6 2009/08/28 13:05:36 vapier Exp $ */ -/********************************************************** - * - * OS Test - Silicon Graphics, Inc. - * - * TEST IDENTIFIER : getgroups02 - * - * EXECUTED BY : anyone - * - * TEST TITLE : Basic test for getgroups(2) - * - * PARENT DOCUMENT : usctpl01 - * - * TEST CASE TOTAL : 1 - * - * WALL CLOCK TIME : 1 - * - * CPU TYPES : ALL - * - * AUTHOR : William Roske - * - * CO-PILOT : Dave Fenner - * - * DATE STARTED : 03/30/92 - * - * INITIAL RELEASE : UNICOS 7.0 - * - * TEST CASES - * - * 1.) getgroups(2) returns...(See Description) - * - * INPUT SPECIFICATIONS - * The standard options for system call tests are accepted. - * (See the parse_opts(3) man page). - * - * OUTPUT SPECIFICATIONS - *$ - * DURATION - * Terminates - with frequency and infinite modes. - * - * SIGNALS - * Uses SIGUSR1 to pause before test if option set. - * (See the parse_opts(3) man page). - * - * RESOURCES - * None - * - * ENVIRONMENTAL NEEDS - * No run-time environmental needs. - * - * SPECIAL PROCEDURAL REQUIREMENTS - * None - * - * INTERCASE DEPENDENCIES - * None - * - * DETAILED DESCRIPTION - * This is a Phase I test for the getgroups(2) system call. It is intended - * to provide a limited exposure of the system call, for now. It - * should/will be extended when full functional tests are written for - * getgroups(2). - * - * Setup: - * Setup signal handling. - * Pause for SIGUSR1 if option specified. - * - * Test: - * Loop if the proper options are given. - * Execute system call - * Check return code, if system call failed (return=-1) - * Log the errno and Issue a FAIL message. - * Otherwise, Issue a PASS message. - * - * Cleanup: - * Print errno log and/or timing stats if options given - * - * - *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/ - -#include <sys/types.h> -#include <sys/param.h> -#include <sys/fcntl.h> -#include <errno.h> -#include <string.h> -#include <signal.h> -#include "test.h" -#include "usctest.h" - -void setup(); -void cleanup(); - -char *TCID = "getgroups02"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test cases. */ - -int exp_enos[] = { 0, 0 }; - -/* define array size for gids */ -#define GID_ARRAY_SIZE 100 - -gid_t gidset[GID_ARRAY_SIZE]; /* array of gids */ - -int main(int ac, char **av) -{ - int lc; - char *msg; - - if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) - tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); - - setup(); - - TEST_EXP_ENOS(exp_enos); - - for (lc = 0; TEST_LOOPING(lc); lc++) { - - tst_count = 0; - - TEST(getgroups(GID_ARRAY_SIZE, gidset)); - - if (TEST_RETURN == -1) - tst_resm(TFAIL | TTERRNO, "getgroups failed"); - else if (STD_FUNCTIONAL_TEST) - tst_resm(TPASS, "getgroups returned %ld", TEST_RETURN); - - } - - cleanup(); - - tst_exit(); -} - -void setup() -{ - - tst_sig(NOFORK, DEF_HANDLER, cleanup); - - TEST_PAUSE; -} - -void cleanup() -{ - TEST_CLEANUP; - -} diff --git a/testcases/kernel/syscalls/getgroups/getgroups03.c b/testcases/kernel/syscalls/getgroups/getgroups03.c index 5950fc4..1e25756 100644 --- a/testcases/kernel/syscalls/getgroups/getgroups03.c +++ b/testcases/kernel/syscalls/getgroups/getgroups03.c @@ -1,25 +1,24 @@ /* + * Copyright (c) International Business Machines Corp., 2001 + * Ported by Wayne Boyer + * Copyright (c) Cyril Hrubis <ch...@su...> 2013 * - * Copyright (c) International Business Machines Corp., 2001 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * the GNU General Public License for more details. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - * the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* - * Test Name: getgroups03 - * * Test Description: * Verify that, getgroups() system call gets the supplementary group IDs * of the calling process. @@ -27,40 +26,6 @@ * Expected Result: * The call succeeds in getting all the supplementary group IDs of the * calling process. The effective group ID may or may not be returned. - * - * Algorithm: - * Setup: - * Setup signal handling. - * Pause for SIGUSR1 if option specified. - * - * Test: - * Loop if the proper options are given. - * Execute system call - * Check return code, if system call failed (return=-1) - * Log the errno and Issue a FAIL message. - * Otherwise, - * Verify the Functionality of system call - * if successful, - * Issue Functionality-Pass message. - * Otherwise, - * Issue Functionality-Fail message. - * Cleanup: - * Print errno log and/or timing stats if options given - * - * Usage: <for command-line> - * getgroups01 [-c n] [-f] [-i n] [-I x] [-P x] [-t] - * where, -c n : Run n copies concurrently. - * -f : Turn off functionality Testing. - * -i n : Execute test n times. - * -I x : Execute test for x seconds. - * -P x : Pause for x seconds between iterations. - * -t : Turn on syscall timing. - * - * HISTORY - * 07/2001 Ported by Wayne Boyer - * - * RESTRICTIONS: - * */ #include <stdio.h> @@ -77,28 +42,24 @@ #include "test.h" #include "usctest.h" -#define TESTUSER "root" -#define PRESENT 1 -#define NOT_PRESENT 0 +#define TESTUSER "root" -char *TCID = "getgroups03"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test conditions */ -int ngroups; /* No. of groups */ -gid_t groups_list[NGROUPS]; /* Array to hold gids for getgroups() */ -gid_t groups[NGROUPS]; /* Array to hold gids read fr. /etc/group */ -int fflag; /* functionality flag variable */ +char *TCID = "getgroups03"; +int TST_TOTAL = 1; -int verify_groups(int); /* function to verify groups returned */ -int readgroups(gid_t *); /* function to read gids of testuser */ -void setup(); /* setup function for the test */ -void cleanup(); /* cleanup function for the test */ +static int ngroups; +static gid_t groups_list[NGROUPS]; +static gid_t groups[NGROUPS]; + +static void verify_groups(int ret_ngroups); +static void setup(void); +static void cleanup(void); int main(int ac, char **av) { int lc; char *msg; - int ret_val; - int gidsetsize = NGROUPS; /* total groups */ + int gidsetsize = NGROUPS; if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); @@ -111,59 +72,31 @@ int main(int ac, char **av) TEST(getgroups(gidsetsize, groups_list)); - if ((ret_val = TEST_RETURN) == -1) { + if (TEST_RETURN == -1) { tst_resm(TFAIL | TTERRNO, "getgroups failed"); continue; } - if (STD_FUNCTIONAL_TEST) { - fflag = verify_groups(ret_val); - if (fflag) - tst_resm(TPASS, - "getgroups functionality correct"); - } else - tst_resm(TPASS, "call succeeded"); + + if (STD_FUNCTIONAL_TEST) + verify_groups(TEST_RETURN); + else + tst_resm(TPASS, "getgroups succeeded"); } cleanup(); - tst_exit(); } -void setup() -{ - - tst_require_root(NULL); - - tst_sig(NOFORK, DEF_HANDLER, cleanup); - - TEST_PAUSE; - - /* - * Get the IDs of all the groups of "root" - * from /etc/group file - */ - ngroups = readgroups(groups); - - /* Setgroups is called by the login(1) process - * if the testcase is executed via an ssh session this - * testcase will fail. So execute setgroups() before executing - * getgroups() - */ - if (setgroups(ngroups, groups) == -1) - tst_brkm(TBROK | TERRNO, cleanup, "setgroups failed"); - -} - /* * readgroups(gid_t *) - Read supplimentary group ids of "root" user * Scans the /etc/group file to get IDs of all the groups to which TESTUSER * belongs and puts them into the array passed. * Returns the no of gids read. */ -int readgroups(gid_t groups[NGROUPS]) +static int readgroups(gid_t groups[NGROUPS]) { - struct group *grp; /* To hold the group entry */ - int ngrps = 0; /* No of groups */ + struct group *grp; + int ngrps = 0; int i; int found; gid_t g; @@ -196,7 +129,30 @@ int readgroups(gid_t groups[NGROUPS]) groups[ngrps++] = g; endgrent(); - return (ngrps); + return ngrps; +} + +static void setup(void) +{ + tst_require_root(NULL); + + tst_sig(NOFORK, DEF_HANDLER, cleanup); + + TEST_PAUSE; + + /* + * Get the IDs of all the groups of "root" + * from /etc/group file + */ + ngroups = readgroups(groups); + + /* Setgroups is called by the login(1) process + * if the testcase is executed via an ssh session this + * testcase will fail. So execute setgroups() before executing + * getgroups() + */ + if (setgroups(ngroups, groups) == -1) + tst_brkm(TBROK | TERRNO, cleanup, "setgroups failed"); } /* @@ -206,14 +162,12 @@ int readgroups(gid_t groups[NGROUPS]) * This function returns flag value which indicates success or failure * of verification. */ -int verify_groups(int ret_val) +static void verify_groups(int ret_ngroups) { - int i, j; /* counter variables */ - gid_t egid; /* Effective gid of the process */ - int egid_flag = PRESENT; /* egid present or not */ - - /* Set the functionality flag */ - fflag = 1; + int i, j; + gid_t egid; + int egid_flag = 1; + int fflag = 1; /* * Loop through the array to verify the gids @@ -222,7 +176,7 @@ int verify_groups(int ret_val) * returned by getgroups() with that read from * group file. */ - for (i = 0; i < ret_val; i++) { + for (i = 0; i < ret_ngroups; i++) { for (j = 0; j < ngroups; j++) { if (groups_list[i] != groups[j]) { /* If loop ends and gids are not matching */ @@ -234,23 +188,23 @@ int verify_groups(int ret_val) } else { continue; } - } else { /* if equal, continue the outer loop */ + } else { break; } } } /* Now do the reverse comparison */ - egid = getegid(); /* get egid */ + egid = getegid(); for (i = 0; i < ngroups; i++) { - for (j = 0; j < ret_val; j++) { + for (j = 0; j < ret_ngroups; j++) { if (groups[i] != groups_list[j]) { /* * If the loop ends & gids are not matching * if gid is not egid, exit with error * else egid is returned by getgroups() */ - if (j == (ret_val - 1)) { + if (j == (ret_ngroups - 1)) { if (groups[i] != egid) { tst_resm(TFAIL, "getgroups " "didn't return %d one " @@ -263,10 +217,10 @@ int verify_groups(int ret_val) * group_list. * Reset the egid flag */ - egid_flag = NOT_PRESENT; + egid_flag = 0; } } - } else { /* if equal, continue the outer loop */ + } else { break; } } @@ -279,20 +233,20 @@ int verify_groups(int ret_val) * Now, if ngroups matches ret_val, as above comparisons of the array * are successful, this implies that the array contents match. */ - if (egid_flag == 0) /* If egid is not returned */ + if (egid_flag == 0) ngroups--; - if (ngroups != ret_val) { + if (ngroups != ret_ngroups) { tst_resm(TFAIL, "getgroups(2) returned incorrect no. of gids %d " - "(expected %d)", ret_val, ngroups); + "(expected %d)", ret_ngroups, ngroups); fflag = 0; } - return (fflag); + if (fflag) + tst_resm(TPASS, "getgroups functionality correct"); } -void cleanup() +static void cleanup(void) { TEST_CLEANUP; - } diff --git a/testcases/kernel/syscalls/getgroups/getgroups04.c b/testcases/kernel/syscalls/getgroups/getgroups04.c deleted file mode 100644 index e1beaff..0000000 --- a/testcases/kernel/syscalls/getgroups/getgroups04.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * - * Copyright (c) International Business Machines Corp., 2001 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See - * the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/* - * Test Name: getgroups04 - * - * Test Description: - * Verify that, - * getgroups() fails with -1 and sets errno to EINVAL if the size - * argument value is -ve. - * - * Expected Result: - * getgroups() should fail with return value -1 and set expected errno. - * - * Algorithm: - * Setup: - * Setup signal handling. - * Pause for SIGUSR1 if option specified. - * - * Test: - * Loop if the proper options are given. - * Execute system call - * Check return code, if system call failed (return=-1) - * if errno set == expected errno - * Issue sys call fails with expected return value and errno. - * Otherwise, - * Issue sys call fails with unexpected errno. - * Otherwise, - * Issue sys call returns unexpected value. - * - * Cleanup: - * Print errno log and/or timing stats if options given - * - * Usage: <for command-line> - * getgroups04 [-c n] [-e] [-i n] [-I x] [-P x] [-t] - * where, -c n : Run n copies concurrently. - * -e : Turn on errno logging. - * -i n : Execute test n times. - * -I x : Execute test for x seconds. - * -P x : Pause for x seconds between iterations. - * -t : Turn on syscall timing. - * - * HISTORY - * 07/2001 Ported by Wayne Boyer - * - * RESTRICTIONS: - * This test should be executed by non-super-user only. - */ - -#include <stdio.h> -#include <sys/types.h> -#include <unistd.h> -#include <errno.h> -#include <string.h> -#include <signal.h> -#include <grp.h> -#include <sys/stat.h> -#include <sys/param.h> - -#include "test.h" -#include "usctest.h" - -char *TCID = "getgroups04"; /* Test program identifier. */ -int TST_TOTAL = 1; /* Total number of test conditions */ -int exp_enos[] = { EINVAL, 0 }; - -gid_t groups_list[NGROUPS]; /* buffer to hold user group list */ - -void setup(); /* setup function for the test */ -void cleanup(); /* cleanup function for the test */ - -struct test_case_t { /* test case struct. to hold ref. test cond's */ - size_t gsize; - gid_t list; - char *desc; - int exp_errno; - int (*setupfunc) (); -} test_cases[] = { - { --1, 1, "Size is < no. suppl. gids", EINVAL},}; - -int main(int ac, char **av) -{ - int lc; - char *msg; - int gidsetsize; /* total no. of groups */ - int i; - char *test_desc; /* test specific error message */ - - if ((msg = parse_opts(ac, av, NULL, NULL)) != NULL) - tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg); - - setup(); - - TEST_EXP_ENOS(exp_enos); - - for (lc = 0; TEST_LOOPING(lc); lc++) { - - tst_count = 0; - - for (i = 0; i < TST_TOTAL; i++) { - gidsetsize = test_cases[i].gsize; - test_desc = test_cases[i].desc; - - TEST(getgroups(gidsetsize, groups_list)); - - if (TEST_RETURN == -1) { - if (TEST_ERRNO == test_cases[i].exp_errno) - tst_resm(TPASS | TTERRNO, - "getgroups failed as expected"); - else - tst_resm(TFAIL | TTERRNO, - "getgroups failed unexpectedly; " - "expected: %d - %s", - test_cases[i].exp_errno, - strerror(test_cases[i]. - exp_errno)); - } else - tst_resm(TFAIL, - "getgroups succeeded unexpectedly"); - } - - } - - cleanup(); - - tst_exit(); -} - -/* - * void - * setup() - performs all ONE TIME setup for this test. - */ -void setup() -{ - - tst_sig(NOFORK, DEF_HANDLER, cleanup); - - TEST_PAUSE; - -} - -/* - * cleanup() - performs all ONE TIME cleanup for this test at - * completion or premature exit. - */ -void cleanup() -{ - /* - * print timing stats if that option was specified. - */ - TEST_CLEANUP; - -} hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-04 13:21:36
|
The branch, master, has been updated via 74500f984c2e2b926650367f6a55f3ee9b33c617 (commit) from 03680e04310ea3cea4cab18c62fdf86b30127c40 (commit) - Log ----------------------------------------------------------------- commit 74500f984c2e2b926650367f6a55f3ee9b33c617 Author: Wanlong Gao <gao...@cn...> Date: Wed Apr 3 11:02:59 2013 +0800 su01: fix the uncompleted string match We find that sometimes "spawn /bin/su -l $USER1 -c whoami" may return two lines: "Attempting to create directory /home/su_usr2/perl5" "su_usr2" So the uncompleted "su_usr2" string match the first line, but we expect to match the second line here. So, fix it to match "su_usr2\r" instead. Reported-by: DAN LI <li...@cn...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: testcases/commands/su/su01_s1 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/commands/su/su01_s1 b/testcases/commands/su/su01_s1 index 4439bde..b50ebdf 100755 --- a/testcases/commands/su/su01_s1 +++ b/testcases/commands/su/su01_s1 @@ -320,7 +320,7 @@ expect { "Password:" { send "$USER1_PASSWORD\r" expect { - "$USER1" { set i_am_correct 1 } + "$USER1\r" { set i_am_correct 1 } } } } hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-02 18:21:23
|
The branch, master, has been updated via 03680e04310ea3cea4cab18c62fdf86b30127c40 (commit) via 261e997abb5e29b85038fcc3ea21d2a6d4b4a520 (commit) via 07700becb55f19298a3c90c88ad56bf6b8ee9c09 (commit) from cbec02d252c8032c5c585f55af0854a2200b1d65 (commit) - Log ----------------------------------------------------------------- commit 03680e04310ea3cea4cab18c62fdf86b30127c40 Author: Cyril Hrubis <ch...@su...> Date: Tue Apr 2 19:17:42 2013 +0200 open_posix_testsuite/.../lio_listio/11-1.c: Remove. The testcase is invalid as POSIX doesn't define what 'successfully queued' means. On Linux (with glibc) 'successfully queued' means that the operation was added to the list of aio requests to be dealt with later which is in accordance with POSIX which request the lio_listio() with mode LIO_NOWAIT to return immediately when the requests are queued. Signed-off-by: Cyril Hrubis <ch...@su...> commit 261e997abb5e29b85038fcc3ea21d2a6d4b4a520 Author: Cyril Hrubis <ch...@su...> Date: Tue Apr 2 15:36:59 2013 +0200 open_posix_testsuite/.../aio_suspend/9-1.c Fix the testcase to adjust aio request sizes as runtime. This testcase fails on machines that are fast enough to complete the hardcoded request size before we get to the aio_suspend(). This patch changes the testcase to do several tries with increasing buffer sizes in order to cover both small embedded systems and large mainframes. There were several race conditions in the original code that had to be fixed in order to be able to run the test repeatedly. Signed-off-by: Cyril Hrubis <ch...@su...> commit 07700becb55f19298a3c90c88ad56bf6b8ee9c09 Author: Cyril Hrubis <ch...@su...> Date: Tue Apr 2 17:30:33 2013 +0200 open_posix_testsuite/.../aio_suspend/7-1.c: Remove. Remove the 7-1.c test which is nearly identical to 9-1.c. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/aio_suspend/7-1.c | 220 -------------------- .../conformance/interfaces/aio_suspend/9-1.c | 176 ++++++++-------- .../conformance/interfaces/lio_listio/11-1.c | 184 ---------------- 3 files changed, 92 insertions(+), 488 deletions(-) delete mode 100644 testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/7-1.c delete mode 100644 testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/7-1.c deleted file mode 100644 index e9e14a5..0000000 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/7-1.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) 2004, Bull SA. All rights reserved. - * Created by: Lau...@bu... - * This file is licensed under the GPL license. For the full content - * of this license, see the COPYING file at the top level of this - * source tree. - */ - -/* - * assertion: - * - * aio_suspend() shall return the value -1 and set errno to indicate error - * if it returns before at least one AIO operation have completed. - * - * method: Testing for a non NULL timeout - * - * - write to a file - * - submit a list of read requests - * - check that the selected request has not completed - * - suspend on selected request - * - check that the suspend timed out - * - check that aio_suspend returns -1 and errno is set to EAGAIN - */ - -#define _XOPEN_SOURCE 600 -#include <sys/stat.h> -#include <aio.h> -#include <errno.h> -#include <fcntl.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -#include "posixtest.h" - -#define TNAME "aio_suspend/7-1.c" - -#define NUM_AIOCBS 10 -#define BUF_SIZE (1024*1024) -#define WAIT_FOR_AIOCB 6 - -static int received_all; - -static void sigrt1_handler(int signum, siginfo_t *info, void *context) -{ - received_all = 1; -} - -int main(void) -{ - char tmpfname[256]; - int fd; - - struct aiocb **aiocbs; - struct aiocb *plist[2]; - char *bufs; - struct sigaction action; - struct sigevent event; - struct timespec ts = { 0, 1000 }; /* 10 ms */ - int errors = 0; - int ret; - int err; - int i; - - if (sysconf(_SC_ASYNCHRONOUS_IO) < 200112L) - return PTS_UNSUPPORTED; - - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_suspend_7_1_%d", - getpid()); - unlink(tmpfname); - - fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); - - if (fd == -1) { - printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); - } - - unlink(tmpfname); - - bufs = malloc(NUM_AIOCBS * BUF_SIZE); - - if (bufs == NULL) { - printf(TNAME " Error at malloc(): %s\n", strerror(errno)); - close(fd); - exit(PTS_UNRESOLVED); - } - - if (write(fd, bufs, NUM_AIOCBS * BUF_SIZE) != (NUM_AIOCBS * BUF_SIZE)) { - printf(TNAME " Error at write(): %s\n", strerror(errno)); - free(bufs); - close(fd); - exit(PTS_UNRESOLVED); - } - - aiocbs = malloc(sizeof(struct aiocb *) * NUM_AIOCBS); - - /* Queue up a bunch of aio reads */ - for (i = 0; i < NUM_AIOCBS; i++) { - - aiocbs[i] = malloc(sizeof(struct aiocb)); - memset(aiocbs[i], 0, sizeof(struct aiocb)); - - aiocbs[i]->aio_fildes = fd; - aiocbs[i]->aio_offset = i * BUF_SIZE; - aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE]; - aiocbs[i]->aio_nbytes = BUF_SIZE; - aiocbs[i]->aio_lio_opcode = LIO_READ; - } - - /* Use SIGRTMIN + 1 for list completion */ - event.sigev_notify = SIGEV_SIGNAL; - event.sigev_signo = SIGRTMIN + 1; - event.sigev_value.sival_ptr = NULL; - - /* Setup handler for list completion */ - action.sa_sigaction = sigrt1_handler; - sigemptyset(&action.sa_mask); - action.sa_flags = SA_SIGINFO | SA_RESTART; - sigaction(SIGRTMIN + 1, &action, NULL); - - /* Setup suspend list */ - plist[0] = NULL; - plist[1] = aiocbs[WAIT_FOR_AIOCB]; - - /* Submit request list */ - ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event); - - if (ret) { - printf(TNAME " Error at lio_listio() %d: %s\n", - errno, strerror(errno)); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_UNRESOLVED); - } - - /* Check selected request has not completed yet */ - if (aio_error(aiocbs[WAIT_FOR_AIOCB]) != EINPROGRESS) { - printf(TNAME " Error : AIOCB %d already completed" - " before suspend\n", WAIT_FOR_AIOCB); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); - } - - /* Suspend on selected request */ - ret = aio_suspend((const struct aiocb **)plist, 2, &ts); - - /* Check selected request has not completed */ - if (aio_error(aiocbs[WAIT_FOR_AIOCB]) != EINPROGRESS) { - printf(TNAME " Error : AIOCB %d should not have completed" - " after timed out suspend\n", WAIT_FOR_AIOCB); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); - } - - /* timed out aio_suspend should return -1 and set errno to EAGAIN */ - if (ret != -1) { - printf(TNAME " aio_suspend() should return -1\n"); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); - } - - if (errno != EAGAIN) { - printf(TNAME " aio_suspend() should set errno to EAGAIN:" - " %d (%s)\n", errno, strerror(errno)); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); - } - - /* Wait for list processing completion */ - while (!received_all) - sleep(1); - - /* Check return code and free things */ - for (i = 0; i < NUM_AIOCBS; i++) { - err = aio_error(aiocbs[i]); - ret = aio_return(aiocbs[i]); - - if ((err != 0) && (ret != BUF_SIZE)) { - printf(TNAME " req %d: error = %d - return = %d\n", - i, err, ret); - errors++; - } - - free(aiocbs[i]); - } - - free(bufs); - free(aiocbs); - - close(fd); - - if (errors != 0) - exit(PTS_FAIL); - - printf(TNAME " PASSED\n"); - - return PTS_PASS; -} diff --git a/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/9-1.c index c14480e..d6ca793 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/9-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_suspend/9-1.c @@ -1,6 +1,8 @@ /* * Copyright (c) 2004, Bull SA. All rights reserved. - * Created by: Lau...@bu... + * Created by: Lau...@bu... + * Copyright (c) 2013 Cyril Hrubis <ch...@su...> + * * This file is licensed under the GPL license. For the full content * of this license, see the COPYING file at the top level of this * source tree. @@ -10,7 +12,7 @@ * assertion: * * aio_suspend() shall fail if: - [EAGAIN] No AIO indicated in the list completed before timeout + * [EAGAIN] No AIO indicated in the list completed before timeout * * method: * @@ -35,38 +37,29 @@ #include "posixtest.h" -#define TNAME "aio_suspend/9-1.c" - -#define NUM_AIOCBS 10 -#define BUF_SIZE (1024*1024) #define WAIT_FOR_AIOCB 6 -static int received_all; +static sig_atomic_t received_all; -static void sigrt1_handler(int signum, siginfo_t *info, void *context) +static void sigrt1_handler() { received_all = 1; } -int main(void) +static int do_test(int num_aiocbs, size_t buf_size) { char tmpfname[256]; int fd; - - struct aiocb **aiocbs; + struct aiocb *aiocbs[num_aiocbs]; struct aiocb *plist[2]; char *bufs; struct sigaction action; struct sigevent event; - struct timespec ts = { 0, 1000000 }; /* 1 ms */ - int errors = 0; - int ret; - int err; + struct timespec ts = {0, 1000000}; /* 1 ms */ + int ret, ret2; + int err = PTS_UNRESOLVED; int i; - if (sysconf(_SC_ASYNCHRONOUS_IO) < 200112L) - return PTS_UNSUPPORTED; - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_suspend_9_1_%d", getpid()); unlink(tmpfname); @@ -74,42 +67,48 @@ int main(void) fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); if (fd == -1) { - printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + printf("Error at open(): %s\n", strerror(errno)); + goto err0; } unlink(tmpfname); - bufs = malloc(NUM_AIOCBS * BUF_SIZE); + int file_size = num_aiocbs * buf_size; + + bufs = malloc(file_size); if (bufs == NULL) { - printf(TNAME " Error at malloc(): %s\n", strerror(errno)); - close(fd); - exit(PTS_UNRESOLVED); + printf("Error at malloc(): %s\n", strerror(errno)); + goto err1; } - if (write(fd, bufs, NUM_AIOCBS * BUF_SIZE) != (NUM_AIOCBS * BUF_SIZE)) { - printf(TNAME " Error at write(): %s\n", strerror(errno)); - free(bufs); - close(fd); - exit(PTS_UNRESOLVED); - } + ret = write(fd, bufs, file_size); + if (ret != file_size) { - aiocbs = malloc(sizeof(struct aiocb *) * NUM_AIOCBS); + if (ret < 0) + printf("Error at write(): %s\n", strerror(errno)); + else + printf("Error at write(): %i of %i written\n", + ret, file_size); - /* Queue up a bunch of aio reads */ - for (i = 0; i < NUM_AIOCBS; i++) { + goto err2; + } + /* Queue up a bunch of aio reads */ + for (i = 0; i < num_aiocbs; i++) { aiocbs[i] = malloc(sizeof(struct aiocb)); memset(aiocbs[i], 0, sizeof(struct aiocb)); aiocbs[i]->aio_fildes = fd; - aiocbs[i]->aio_offset = i * BUF_SIZE; - aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE]; - aiocbs[i]->aio_nbytes = BUF_SIZE; + aiocbs[i]->aio_offset = i * buf_size; + aiocbs[i]->aio_buf = &bufs[i * buf_size]; + aiocbs[i]->aio_nbytes = buf_size; aiocbs[i]->aio_lio_opcode = LIO_READ; } + /* reset the completion flag */ + received_all = 0; + /* Use SIGRTMIN+1 for list completion */ event.sigev_notify = SIGEV_SIGNAL; event.sigev_signo = SIGRTMIN + 1; @@ -125,82 +124,91 @@ int main(void) plist[1] = aiocbs[WAIT_FOR_AIOCB]; /* Submit request list */ - ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event); + ret = lio_listio(LIO_NOWAIT, aiocbs, num_aiocbs, &event); if (ret) { - printf(TNAME " Error at lio_listio() %d: %s\n", + printf(" Error at lio_listio() %d: %s\n", errno, strerror(errno)); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_UNRESOLVED); + goto err3; } + /* Suspend on selected request */ + ret = aio_suspend((const struct aiocb **)plist, 2, &ts); + /* Check selected request has not completed yet */ - err = aio_error(aiocbs[WAIT_FOR_AIOCB]); - if (err != EINPROGRESS) { - printf(TNAME " Error : AIOCB %d already completed" - " before suspend\n", WAIT_FOR_AIOCB); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); + ret2 = aio_error(aiocbs[WAIT_FOR_AIOCB]); + if (ret2 != EINPROGRESS) { + /* + * The operation was too fast, wait for completion + * and redo it with larger buffers. + */ + err = -1; + goto err4; } - /* Suspend on selected request */ - ret = aio_suspend((const struct aiocb **)plist, 2, &ts); /* timed out aio_suspend should return -1 and set errno to EAGAIN */ if (ret != -1) { - printf(TNAME " aio_suspend() should return -1\n"); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); + printf("aio_suspend() should return -1\n"); + err = PTS_FAIL; + goto err4; } if (errno != EAGAIN) { - printf(TNAME " aio_suspend() should set errno to EAGAIN:" - " %d (%s)\n", errno, strerror(errno)); - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - free(aiocbs); - close(fd); - exit(PTS_FAIL); + printf("aio_suspend() should set errno to EAGAIN: %d (%s)\n", + errno, strerror(errno)); + err = PTS_FAIL; + goto err4; } /* Wait for list processing completion */ while (!received_all) - sleep(1); + usleep(10000); - /* Check return code and free things */ - for (i = 0; i < NUM_AIOCBS; i++) { + /* Check return values and errors */ + err = PTS_PASS; + + for (i = 0; i < num_aiocbs; i++) { err = aio_error(aiocbs[i]); ret = aio_return(aiocbs[i]); - if ((err != 0) && (ret != BUF_SIZE)) { - printf(TNAME " req %d: error = %d - return = %d\n", + if ((err != 0) && ((size_t)ret != buf_size)) { + printf("req %d: error = %d - return = %d\n", i, err, ret); - errors++; + err = PTS_FAIL; } - - free(aiocbs[i]); } +err4: + while (!received_all) + usleep(10000); +err3: + for (i = 0; i < num_aiocbs; i++) + free(aiocbs[i]); +err2: free(bufs); - free(aiocbs); - +err1: close(fd); +err0: + return err; +} + +int main(void) +{ + int aio_cbs = 10; + int buf_size = 1024 * 64; + int ret; + + if (sysconf(_SC_ASYNCHRONOUS_IO) < 200112L) + return PTS_UNSUPPORTED; - if (errors != 0) - exit(PTS_FAIL); + /* Repeat the test with increasing buffer size */ + do { + ret = do_test(aio_cbs, buf_size); + buf_size += buf_size / 4; + } while (ret == -1); - printf(TNAME " PASSED\n"); + if (ret != 0) + return ret; + printf("(buf_size = %i)\nTest PASSED\n", buf_size); return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c deleted file mode 100644 index 7277187..0000000 --- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/11-1.c +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2004, Bull SA. All rights reserved. - * Created by: Lau...@bu... - * This file is licensed under the GPL license. For the full content - * of this license, see the COPYING file at the top level of this - * source tree. - */ - -/* - * assertion: - * - * if mode is LIO_NOWAIT, lio_listio() shall return the value -1 and set - * errno to indicate error if the operation is not succesfully queued. - * - * method: - * - * - open a file for writing - * - submit a list with invalid opcodes to lio_listio in LIO_NOWAIT mode - * - check that lio_listio returns -1 - * - */ - -#define _XOPEN_SOURCE 600 -#include <sys/stat.h> -#include <aio.h> -#include <errno.h> -#include <fcntl.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include "posixtest.h" - -#define TNAME "lio_listio/11-1.c" - -#define NUM_AIOCBS 10 -#define BUF_SIZE 1024 - -int received_selected = 0; -int received_all = 0; - -void sigrt1_handler(int signum, siginfo_t * info, void *context) -{ - received_selected = info->si_value.sival_int; -} - -void sigrt2_handler(int signum, siginfo_t * info, void *context) -{ - received_all = 1; -} - -int main(void) -{ - char tmpfname[256]; - int fd; - - struct aiocb *aiocbs[NUM_AIOCBS]; - char *bufs; - struct sigaction action; - struct sigevent event; - int errors = 0; - int ret; - int err; - int i; - - if (sysconf(_SC_ASYNCHRONOUS_IO) < 200112L) - exit(PTS_UNSUPPORTED); - - snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_lio_listio_11_1_%d", - getpid()); - unlink(tmpfname); - - fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); - - if (fd == -1) { - printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); - } - - unlink(tmpfname); - - bufs = (char *)malloc(NUM_AIOCBS * BUF_SIZE); - - if (bufs == NULL) { - printf(TNAME " Error at malloc(): %s\n", strerror(errno)); - close(fd); - exit(PTS_UNRESOLVED); - } - - /* Queue up a bunch of aio writes */ - for (i = 0; i < NUM_AIOCBS; i++) { - - aiocbs[i] = (struct aiocb *)malloc(sizeof(struct aiocb)); - memset(aiocbs[i], 0, sizeof(struct aiocb)); - - aiocbs[i]->aio_fildes = fd; - aiocbs[i]->aio_offset = 0; - aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE]; - aiocbs[i]->aio_nbytes = BUF_SIZE; - - if (i == 2) - aiocbs[i]->aio_lio_opcode = -1; - else - aiocbs[i]->aio_lio_opcode = LIO_WRITE; - - /* Use SIRTMIN+1 for individual completions */ - aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL; - aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1; - aiocbs[i]->aio_sigevent.sigev_value.sival_int = i; - } - - /* Use SIGRTMIN+2 for list completion */ - event.sigev_notify = SIGEV_SIGNAL; - event.sigev_signo = SIGRTMIN + 2; - event.sigev_value.sival_ptr = NULL; - - /* Setup handler for individual operation completion */ - action.sa_sigaction = sigrt1_handler; - sigemptyset(&action.sa_mask); - action.sa_flags = SA_SIGINFO | SA_RESTART; - sigaction(SIGRTMIN + 1, &action, NULL); - - /* Setup handler for list completion */ - action.sa_sigaction = sigrt2_handler; - sigemptyset(&action.sa_mask); - action.sa_flags = SA_SIGINFO | SA_RESTART; - sigaction(SIGRTMIN + 2, &action, NULL); - - /* Submit request list */ - ret = lio_listio(LIO_NOWAIT, aiocbs, NUM_AIOCBS, &event); - - if (ret == 0) { - printf(TNAME " Error lio_listio() should have returned -1\n"); - - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - free(bufs); - close(fd); - exit(PTS_FAIL); - } - - if (errno != EIO) { - printf(TNAME " lio_listio() should set errno to EIO %d\n", - errno); - - for (i = 0; i < NUM_AIOCBS; i++) - free(aiocbs[i]); - - close(fd); - exit(PTS_FAIL); - } - - while (received_all == 0) - sleep(1); - - /* Check return code and free things */ - for (i = 0; i < NUM_AIOCBS; i++) { - if (i == 2) - continue; - - err = aio_error(aiocbs[i]); - ret = aio_return(aiocbs[i]); - - if ((err != 0) && (ret != BUF_SIZE)) { - printf(TNAME " req %d: error = %d - return = %d\n", i, - err, ret); - errors++; - } - - free(aiocbs[i]); - } - - free(bufs); - - close(fd); - - if (errors != 0) - exit(PTS_FAIL); - - printf(TNAME " PASSED\n"); - - return PTS_PASS; -} hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-02 11:21:20
|
The branch, master, has been updated via cbec02d252c8032c5c585f55af0854a2200b1d65 (commit) from 36b4a0e6cce5e4f1a92c7ae2073c00452bf40321 (commit) - Log ----------------------------------------------------------------- commit cbec02d252c8032c5c585f55af0854a2200b1d65 Author: Jan Stancek <jst...@re...> Date: Tue Apr 2 12:16:58 2013 +0200 syscalls/clone: initialize sa_mask Avoid using uninitialized field "act.sa_mask"."__val" when calling sigaction(). Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/clone/clone02.c | 2 ++ testcases/kernel/syscalls/clone/clone07.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/clone/clone02.c b/testcases/kernel/syscalls/clone/clone02.c index c49a3d7..be8591f 100644 --- a/testcases/kernel/syscalls/clone/clone02.c +++ b/testcases/kernel/syscalls/clone/clone02.c @@ -242,6 +242,7 @@ static int test_setup(void) /* Setup signal handler for SIGUSR2 */ def_act.sa_handler = sig_default_handler; def_act.sa_flags = SA_RESTART; + sigemptyset(&def_act.sa_mask); if (sigaction(SIGUSR2, &def_act, NULL) == -1) { tst_resm(TWARN | TERRNO, "sigaction() failed in test_setup()"); @@ -376,6 +377,7 @@ static int test_SIG(void) new_act.sa_handler = sig_child_defined_handler; new_act.sa_flags = SA_RESTART; + sigemptyset(&new_act.sa_mask); /* Set signal handler to sig_child_defined_handler */ if (sigaction(SIGUSR2, &new_act, NULL) == -1) { diff --git a/testcases/kernel/syscalls/clone/clone07.c b/testcases/kernel/syscalls/clone/clone07.c index 29fd069..afcc716 100644 --- a/testcases/kernel/syscalls/clone/clone07.c +++ b/testcases/kernel/syscalls/clone/clone07.c @@ -94,6 +94,7 @@ static void setup(void) act.sa_handler = sigsegv_handler; act.sa_flags = SA_RESTART; + sigemptyset(&act.sa_mask); if ((sigaction(SIGSEGV, &act, NULL)) == -1) tst_resm(TWARN | TERRNO, "sigaction() for SIGSEGV failed in test_setup()"); @@ -101,6 +102,7 @@ static void setup(void) /* Setup signal handler for SIGUSR2 */ def_act.sa_handler = sigusr2_handler; def_act.sa_flags = SA_RESTART | SA_RESETHAND; + sigemptyset(&def_act.sa_mask); if ((sigaction(SIGUSR2, &def_act, NULL)) == -1) tst_resm(TWARN | TERRNO, hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-02 10:21:29
|
The branch, master, has been updated via 36b4a0e6cce5e4f1a92c7ae2073c00452bf40321 (commit) from 33b0fe6194f8e7922ac3286bd5bbf6273b4a096b (commit) - Log ----------------------------------------------------------------- commit 36b4a0e6cce5e4f1a92c7ae2073c00452bf40321 Author: Jan Stancek <jst...@re...> Date: Tue Apr 2 11:42:59 2013 +0200 fixed leaked fds in setup/cleanup_proc_fs Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/utils/common_j_h.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/utils/common_j_h.c b/testcases/kernel/syscalls/utils/common_j_h.c index 4c255ca..43165ca 100644 --- a/testcases/kernel/syscalls/utils/common_j_h.c +++ b/testcases/kernel/syscalls/utils/common_j_h.c @@ -296,6 +296,7 @@ int setup_proc_fs(char *path, int newval, int *oldval) } while (rc < 0 && errno == EAGAIN); if (rc < 0) { EPRINTF("read failed.\n"); + close(fd); return -1; } @@ -303,6 +304,7 @@ int setup_proc_fs(char *path, int newval, int *oldval) sprintf(buf, "%d\n", newval); len = strlen(buf); rc = write(fd, buf, len); + close(fd); if (rc != len) { EPRINTF("write failed.\n"); return -1; @@ -324,6 +326,7 @@ int cleanup_proc_fs(char *path, int oldval) sprintf(buf, "%d\n", oldval); len = strlen(buf); rc = write(fd, buf, len); + close(fd); if (rc != len) { EPRINTF("write failed.\n"); return -1; hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-04-02 09:21:22
|
The branch, master, has been updated via 33b0fe6194f8e7922ac3286bd5bbf6273b4a096b (commit) from e896b67af5888c30de9cd864503690b85e7060ab (commit) - Log ----------------------------------------------------------------- commit 33b0fe6194f8e7922ac3286bd5bbf6273b4a096b Author: Jan Stancek <jst...@re...> Date: Tue Apr 2 11:02:14 2013 +0200 open_posix_testsuite/.../shm_unlink/10-2.c: fix shm_name overrun path_max+1 is out of bounds for shm_name array. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/shm_unlink/10-2.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c index bbd4d7c..4426108 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/shm_unlink/10-2.c @@ -41,7 +41,7 @@ int main(void) for (i = 0; i < path_max; i++) shm_name[i] = (i + 1) % COMPONENT_SIZE ? 'a' : '/'; - shm_name[path_max + 1] = 0; + shm_name[path_max] = 0; result = shm_unlink(shm_name); hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-03-27 17:21:26
|
The branch, master, has been updated via e896b67af5888c30de9cd864503690b85e7060ab (commit) via 9cb0dbcfd803e16f05d0e90d7e89fba15dc9d265 (commit) via ca435d036172b087e44ccec63d6e19fcf870ace4 (commit) via e5bbcd4d54738328b63df55e16ea3a9983ec4244 (commit) from bd3edab243b5ee19f89d394ac90172cff82073e1 (commit) - Log ----------------------------------------------------------------- commit e896b67af5888c30de9cd864503690b85e7060ab Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 18:10:43 2013 +0100 open_posix_testsuite/.../sched_setscheduler: Fix. * Change exit() to plain return * Silence unused warnings Signed-off-by: Cyril Hrubis <ch...@su...> commit 9cb0dbcfd803e16f05d0e90d7e89fba15dc9d265 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 18:05:30 2013 +0100 open_posix_testsuite/.../pthread_once: Fix. * Remove the return from a function returning void Signed-off-by: Cyril Hrubis <ch...@su...> commit ca435d036172b087e44ccec63d6e19fcf870ace4 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 17:44:01 2013 +0100 open_posix_testsuite/.../sigaltstack: Fix. * Remove unused variable * Silence unused warnings * Remove useless casts Signed-off-by: Cyril Hrubis <ch...@su...> commit e5bbcd4d54738328b63df55e16ea3a9983ec4244 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 17:33:11 2013 +0100 open_posix_testsuite/.../pthread_spin_trylock: Fix. * Fix ordering 'volatile static' vs 'static volatile' * Silence unused warning Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/pthread_once/1-1.c | 1 - .../interfaces/pthread_spin_trylock/1-1.c | 6 ++++-- .../interfaces/sched_setscheduler/15-1.c | 1 + .../interfaces/sched_setscheduler/15-2.c | 1 + .../interfaces/sched_setscheduler/17-5.c | 4 ++-- .../interfaces/sched_setscheduler/22-1.c | 1 + .../interfaces/sched_setscheduler/22-2.c | 1 + .../conformance/interfaces/sigaltstack/1-1.c | 4 ++-- .../conformance/interfaces/sigaltstack/10-1.c | 4 ++-- .../conformance/interfaces/sigaltstack/11-1.c | 4 ++-- .../conformance/interfaces/sigaltstack/12-1.c | 4 ++-- .../conformance/interfaces/sigaltstack/2-1.c | 6 +++--- .../conformance/interfaces/sigaltstack/3-1.c | 6 +++--- .../conformance/interfaces/sigaltstack/5-1.c | 4 ++-- .../conformance/interfaces/sigaltstack/6-1.c | 6 +++--- .../conformance/interfaces/sigaltstack/7-1.c | 8 ++++---- .../conformance/interfaces/sigaltstack/8-1.c | 8 ++++---- .../conformance/interfaces/sigaltstack/9-1.c | 1 - 18 files changed, 37 insertions(+), 33 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c index 48d6e55..bb212c0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c @@ -32,7 +32,6 @@ static int init_flag; void an_init_func(void) { init_flag++; - return NULL; } int main(void) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c index 43399ad..0ba6994 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c @@ -30,8 +30,8 @@ #include "posixtest.h" static pthread_spinlock_t spinlock; -volatile static int thread_state; -int rc; +static volatile int thread_state; +static int rc; #define NOT_CREATED_THREAD 1 #define ENTERED_THREAD 2 @@ -56,6 +56,8 @@ static void *fn_chld(void *arg) struct sigaction act; thread_state = ENTERED_THREAD; + (void) arg; + /* Set up child thread to handle SIGALRM */ act.sa_flags = 0; act.sa_handler = sig_handler; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c index 9afda3e..305a6da 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c @@ -21,6 +21,7 @@ void *runner(void *arg) { + (void) arg; while (1) sleep(1); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c index 1fe16c8..30013bb 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c @@ -21,6 +21,7 @@ void *runner(void *arg) { + (void) arg; while (1) sleep(1); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c index 88346c7..7082af2 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c @@ -75,13 +75,13 @@ int main(void) if (old_policy != new_policy) { printf("Failed: invalid policy change, old: %u, new %u\n", old_policy, new_policy); - exit(PTS_FAIL); + return PTS_FAIL; } if (old_priority != param.sched_priority) { printf("Failed: invalid priority change, old: %u, new %u\n", old_priority, param.sched_priority); - exit(PTS_FAIL); + return PTS_FAIL; } printf("Test PASSED\n"); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c index 1e82b76..ad0a469 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c @@ -21,6 +21,7 @@ void *runner(void *arg) { + (void) arg; while (1) sleep(1); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c index 546e6f2..2196ecc 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c @@ -21,6 +21,7 @@ void *runner(void *arg) { + (void) arg; while (1) sleep(1); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c index 9c46dd6..b3d2c34 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c @@ -30,7 +30,7 @@ stack_t alternate_s; -void handler(int signo) +void handler() { int i = 0; if ((void *)&i < (alternate_s.ss_sp) @@ -57,7 +57,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c index 7af6185..0452414 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c @@ -20,7 +20,7 @@ stack_t alternate_s; -void handler(int signo) +void handler() { printf("Just a dummy handler\n"); } @@ -39,7 +39,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c index daabdb8..2c16411 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c @@ -29,7 +29,7 @@ stack_t altstack1; -void handler(int signo) +void handler() { printf("Just a dummy handler\n"); } @@ -48,7 +48,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((altstack1.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c index 3e42aaa..6fcefff 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c @@ -29,7 +29,7 @@ stack_t altstack1; -void handler(int signo) +void handler() { printf("Just a dummy handler\n"); } @@ -48,7 +48,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((altstack1.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c index 9fd49ee..a1cb9ec 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c @@ -29,9 +29,9 @@ #define SIGTOTEST SIGUSR1 -stack_t alternate_s, original_s; +static stack_t alternate_s, original_s; -void handler(int signo) +void handler() { stack_t handler_s; @@ -76,7 +76,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c index 5085336..3a3d7e3 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c @@ -31,9 +31,9 @@ #define SIGTOTEST SIGUSR1 -stack_t alternate_s; +static stack_t alternate_s; -void handler(int signo) +void handler() { stack_t handler_s; @@ -72,7 +72,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c index 3294166..f75a030 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c @@ -19,7 +19,7 @@ #define SIGTOTEST SIGUSR1 -void handler(int signo) +void handler() { printf("Do nothing useful\n"); } @@ -39,7 +39,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c index 046f287..0b6e6f2 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c @@ -27,9 +27,9 @@ #define SIGTOTEST SIGUSR1 -stack_t alternate_s; +static stack_t alternate_s; -void handler(int signo) +void handler() { stack_t handler_s; @@ -60,7 +60,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c index 429e58e..9319cd8 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c @@ -27,13 +27,13 @@ #define SIGTOTEST SIGUSR1 -stack_t altstack1; +static stack_t altstack1; -void handler(int signo) +void handler() { stack_t altstack2; - if ((altstack2.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((altstack2.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); exit(PTS_UNRESOLVED); @@ -63,7 +63,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((altstack1.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c index 6c36f95..38a6965 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c @@ -27,13 +27,13 @@ #define SIGTOTEST SIGUSR1 -stack_t alternate_s; +static stack_t alternate_s; -void handler(int signo) +void handler() { stack_t handler_s; - if (sigaltstack((stack_t *) 0, &handler_s) == -1) { + if (sigaltstack(NULL, &handler_s) == -1) { perror ("Unexpected error while attempting to setup test pre-conditions"); exit(PTS_UNRESOLVED); @@ -60,7 +60,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) { + if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) { perror ("Unexpected error while attempting to setup test pre-conditions"); return PTS_UNRESOLVED; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c index 3f6d11f..ea9b7ef 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c @@ -35,7 +35,6 @@ #include "posixtest.h" static stack_t a; -static char path[PATH_MAX + 1]; int main(int argc, char *argv[]) { hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-03-27 16:21:46
|
The branch, master, has been updated via bd3edab243b5ee19f89d394ac90172cff82073e1 (commit) via 94055f29017b372f4f2b6852a70a1c505d169499 (commit) via 5f3786942119704d17da876239c71a125985becc (commit) via 2eccda5924f367d9ab10cb4c8b69658f86c3a81e (commit) via f77d273a40edb49e7cfb0d74a608bcc2c5598b11 (commit) via 614a8c67d7cab771c43aab5215da727cc6fe3297 (commit) via e7a2d0f2d669b92332d0f40fdf02407f84ca2233 (commit) via c3c012e6c4bbcb3d2d08c25cc9a61a2f57aa7435 (commit) via fb3e72b1b9e104f39cbdf13009a6bd09665fc7ad (commit) via 4894882aae545e1c16c263cc58ae8ccfcf287391 (commit) via 7b06e6c668b109655662588d36af9ca656affcbe (commit) via 5127614eb3ee4903d3e0388fcfdadb952111ac8b (commit) via 218e5b627562c197f49e5191f5aaa75208c2e154 (commit) via 064fe1a1dc44414f15056f1004c829df8a877285 (commit) via 4ba1c46742f4b272d14b042a8e286a1a518f539f (commit) via 75d9d65295cf559f9ba38aae5c16acf426e397f9 (commit) from d743731a0789e2ab740caafffa37de8383a3b141 (commit) - Log ----------------------------------------------------------------- commit bd3edab243b5ee19f89d394ac90172cff82073e1 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 16:48:28 2013 +0100 conformance/interfaces/sigaction/19-*.c: Regenerate. Signed-off-by: Cyril Hrubis <ch...@su...> commit 94055f29017b372f4f2b6852a70a1c505d169499 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 16:47:54 2013 +0100 conformance/interfaces/sigaction/templates/19-1.in * Fix template 19-x testcases template. Signed-off-by: Cyril Hrubis <ch...@su...> commit 5f3786942119704d17da876239c71a125985becc Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 16:26:32 2013 +0100 conformance/interfaces/sigaction/18-*.c: Regenerate. Signed-off-by: Cyril Hrubis <ch...@su...> commit 2eccda5924f367d9ab10cb4c8b69658f86c3a81e Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 16:23:13 2013 +0100 conformance/interfaces/sigaction/templates/18-1.in * Fix template 18-x testcases template. Signed-off-by: Cyril Hrubis <ch...@su...> commit f77d273a40edb49e7cfb0d74a608bcc2c5598b11 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 16:04:46 2013 +0100 open_posix_testsuite/scripts/generate-makefiles.sh: Fix. Fix the test build failure detection and also enable warnings for testcases that failed to compile. Signed-off-by: Cyril Hrubis <ch...@su...> commit 614a8c67d7cab771c43aab5215da727cc6fe3297 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 16:00:01 2013 +0100 conformance/interfaces/sigaction/28-*.c: Regenerate. Signed-off-by: Cyril Hrubis <ch...@su...> commit e7a2d0f2d669b92332d0f40fdf02407f84ca2233 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 15:59:10 2013 +0100 conformance/interfaces/sigaction/templates/28-1.in * Fix template 28-x testcases template. Signed-off-by: Cyril Hrubis <ch...@su...> commit c3c012e6c4bbcb3d2d08c25cc9a61a2f57aa7435 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 15:35:52 2013 +0100 open_posix_testsuite/.../pthread_spin_unlock: Fix. * Fix ordering 'volatile static' vs 'static volatile' * Silence unused warnings Signed-off-by: Cyril Hrubis <ch...@su...> commit fb3e72b1b9e104f39cbdf13009a6bd09665fc7ad Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 15:33:50 2013 +0100 open_posix_testsuite/.../pthread_spin_lock: Fix. * Fix ordering 'volatile static' vs 'static volatile' * Silence unused warnings Signed-off-by: Cyril Hrubis <ch...@su...> commit 4894882aae545e1c16c263cc58ae8ccfcf287391 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 15:20:38 2013 +0100 open_posix_testsuite/.../testfrmw/threads_scenarii: Fix. * Fix types in order not to generate warnings. Signed-off-by: Cyril Hrubis <ch...@su...> commit 7b06e6c668b109655662588d36af9ca656affcbe Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 15:16:02 2013 +0100 open_posix_testsuite/.../pthread_cond_timedwait: Cleanup. * Remove useless comments. Signed-off-by: Cyril Hrubis <ch...@su...> commit 5127614eb3ee4903d3e0388fcfdadb952111ac8b Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 15:12:08 2013 +0100 open_posix_testsuite/.../pthread_cond_timedwait: Fix. * Fix types and casts not to generate warnings. * Silence unused warnings for signal handlers and thread functions. Signed-off-by: Cyril Hrubis <ch...@su...> commit 218e5b627562c197f49e5191f5aaa75208c2e154 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 14:56:31 2013 +0100 open_posix_testsuite/.../nanosleep/10000-1: Fix. * Fix printf() format string Signed-off-by: Cyril Hrubis <ch...@su...> commit 064fe1a1dc44414f15056f1004c829df8a877285 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 13:53:52 2013 +0100 open_posix_testsuite/.../mq_open: Fix. * Change exit() to plain return * Add cast to void to silence unused warnings Signed-off-by: Cyril Hrubis <ch...@su...> commit 4ba1c46742f4b272d14b042a8e286a1a518f539f Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 13:48:43 2013 +0100 open_posix_testsuite/include/noatime: Fix. * Remove unused variable. * Add parenthesis Signed-off-by: Cyril Hrubis <ch...@su...> commit 75d9d65295cf559f9ba38aae5c16acf426e397f9 Author: Cyril Hrubis <ch...@su...> Date: Wed Mar 27 13:38:29 2013 +0100 open_posix_testsuite/.../mmap: Fix. * Include time.h for time() * Change size_t to ssize_t to fix warning. * Check for right signal delivered Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/mmap/1-1.c | 2 +- .../conformance/interfaces/mmap/11-2.c | 8 +- .../conformance/interfaces/mmap/11-3.c | 8 +- .../conformance/interfaces/mmap/11-5.c | 2 +- .../conformance/interfaces/mmap/11-6.c | 2 +- .../conformance/interfaces/mmap/12-1.c | 2 +- .../conformance/interfaces/mmap/13-1.c | 3 +- .../conformance/interfaces/mmap/14-1.c | 3 +- .../conformance/interfaces/mmap/5-1.c | 3 +- .../conformance/interfaces/mmap/6-2.c | 2 +- .../conformance/interfaces/mmap/7-1.c | 2 +- .../conformance/interfaces/mmap/7-2.c | 2 +- .../conformance/interfaces/mq_open/16-1.c | 4 +- .../conformance/interfaces/mq_open/2-1.c | 1 + .../conformance/interfaces/mq_open/20-1.c | 1 + .../conformance/interfaces/mq_open/7-2.c | 1 + .../conformance/interfaces/mq_open/8-2.c | 1 + .../conformance/interfaces/mq_open/9-2.c | 1 + .../conformance/interfaces/nanosleep/10000-1.c | 4 +- .../interfaces/pthread_cond_timedwait/1-1.c | 2 + .../interfaces/pthread_cond_timedwait/2-1.c | 2 + .../interfaces/pthread_cond_timedwait/2-2.c | 4 +- .../interfaces/pthread_cond_timedwait/2-3.c | 4 +- .../interfaces/pthread_cond_timedwait/2-4.c | 34 +--- .../interfaces/pthread_cond_timedwait/2-5.c | 3 +- .../interfaces/pthread_cond_timedwait/2-6.c | 46 ++--- .../interfaces/pthread_cond_timedwait/2-7.c | 35 +--- .../interfaces/pthread_cond_timedwait/3-1.c | 2 + .../interfaces/pthread_cond_timedwait/4-1.c | 2 + .../interfaces/pthread_cond_timedwait/4-2.c | 35 +--- .../interfaces/pthread_cond_timedwait/4-3.c | 39 +--- .../conformance/interfaces/pthread_spin_lock/1-1.c | 4 +- .../conformance/interfaces/pthread_spin_lock/1-2.c | 4 +- .../interfaces/pthread_spin_unlock/1-1.c | 4 +- .../interfaces/pthread_spin_unlock/1-2.c | 4 +- .../interfaces/pthread_spin_unlock/3-1.c | 4 +- .../conformance/interfaces/sigaction/18-1.c | 94 +++------ .../conformance/interfaces/sigaction/18-10.c | 94 +++------ .../conformance/interfaces/sigaction/18-11.c | 94 +++------ .../conformance/interfaces/sigaction/18-12.c | 94 +++------ .../conformance/interfaces/sigaction/18-13.c | 94 +++------ .../conformance/interfaces/sigaction/18-14.c | 94 +++------ .../conformance/interfaces/sigaction/18-15.c | 94 +++------ .../conformance/interfaces/sigaction/18-16.c | 94 +++------ .../conformance/interfaces/sigaction/18-17.c | 94 +++------ .../conformance/interfaces/sigaction/18-18.c | 94 +++------ .../conformance/interfaces/sigaction/18-19.c | 97 +++------ .../conformance/interfaces/sigaction/18-2.c | 94 +++------ .../conformance/interfaces/sigaction/18-20.c | 94 +++------ .../conformance/interfaces/sigaction/18-21.c | 94 +++------ .../conformance/interfaces/sigaction/18-22.c | 94 +++------ .../conformance/interfaces/sigaction/18-23.c | 94 +++------ .../conformance/interfaces/sigaction/18-24.c | 94 +++------ .../conformance/interfaces/sigaction/18-25.c | 94 +++------ .../conformance/interfaces/sigaction/18-26.c | 94 +++------ .../conformance/interfaces/sigaction/18-3.c | 94 +++------ .../conformance/interfaces/sigaction/18-4.c | 94 +++------ .../conformance/interfaces/sigaction/18-5.c | 94 +++------ .../conformance/interfaces/sigaction/18-6.c | 94 +++------ .../conformance/interfaces/sigaction/18-7.c | 94 +++------ .../conformance/interfaces/sigaction/18-8.c | 94 +++------ .../conformance/interfaces/sigaction/18-9.c | 94 +++------ .../conformance/interfaces/sigaction/19-1.c | 105 +++------- .../conformance/interfaces/sigaction/19-10.c | 105 +++------- .../conformance/interfaces/sigaction/19-11.c | 105 +++------- .../conformance/interfaces/sigaction/19-12.c | 105 +++------- .../conformance/interfaces/sigaction/19-13.c | 105 +++------- .../conformance/interfaces/sigaction/19-14.c | 105 +++------- .../conformance/interfaces/sigaction/19-15.c | 105 +++------- .../conformance/interfaces/sigaction/19-16.c | 105 +++------- .../conformance/interfaces/sigaction/19-17.c | 105 +++------- .../conformance/interfaces/sigaction/19-18.c | 105 +++------- .../conformance/interfaces/sigaction/19-19.c | 108 ++++------ .../conformance/interfaces/sigaction/19-2.c | 105 +++------- .../conformance/interfaces/sigaction/19-20.c | 105 +++------- .../conformance/interfaces/sigaction/19-21.c | 105 +++------- .../conformance/interfaces/sigaction/19-22.c | 105 +++------- .../conformance/interfaces/sigaction/19-23.c | 105 +++------- .../conformance/interfaces/sigaction/19-24.c | 105 +++------- .../conformance/interfaces/sigaction/19-25.c | 105 +++------- .../conformance/interfaces/sigaction/19-26.c | 105 +++------- .../conformance/interfaces/sigaction/19-3.c | 105 +++------- .../conformance/interfaces/sigaction/19-4.c | 105 +++------- .../conformance/interfaces/sigaction/19-5.c | 105 +++------- .../conformance/interfaces/sigaction/19-6.c | 105 +++------- .../conformance/interfaces/sigaction/19-7.c | 105 +++------- .../conformance/interfaces/sigaction/19-8.c | 105 +++------- .../conformance/interfaces/sigaction/19-9.c | 105 +++------- .../conformance/interfaces/sigaction/28-1.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-10.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-11.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-12.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-13.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-14.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-15.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-16.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-17.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-18.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-19.c | 204 ++++--------------- .../conformance/interfaces/sigaction/28-2.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-20.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-21.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-22.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-23.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-24.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-25.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-26.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-3.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-4.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-5.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-6.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-7.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-8.c | 199 +++--------------- .../conformance/interfaces/sigaction/28-9.c | 199 +++--------------- .../sigaction/templates/template_18-1.in | 114 +++------- .../sigaction/templates/template_19-1.in | 131 ++++-------- .../sigaction/templates/template_28-1.in | 222 ++++---------------- .../interfaces/testfrmw/threads_scenarii.c | 7 +- testcases/open_posix_testsuite/include/noatime.h | 4 +- .../scripts/generate-makefiles.sh | 4 +- 120 files changed, 2681 insertions(+), 8440 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/1-1.c index 6ff4db4..a9f5596 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/1-1.c @@ -32,7 +32,7 @@ int main(void) char tmpfname[256]; char *data; void *pa; - size_t len = 1024; + ssize_t len = 1024; int fd; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_1_1_%d", getpid()); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-2.c index bc679bd..cdb6b70 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-2.c @@ -36,9 +36,11 @@ void sigbus_handler(int signum) { - WRITE("SIGBUS triggered\n"); - WRITE("Test PASSED\n"); - _exit(PTS_PASS); + if (signum == SIGBUS) { + WRITE("SIGBUS triggered\n"); + WRITE("Test PASSED\n"); + _exit(PTS_PASS); + } } int main(void) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-3.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-3.c index 538019b..3a5bb8a 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-3.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-3.c @@ -36,9 +36,11 @@ void sigbus_handler(int signum) { - WRITE("SIGBUS triggered\n"); - WRITE("Test PASSED\n"); - _exit(PTS_PASS); + if (signum == SIGBUS) { + WRITE("SIGBUS triggered\n"); + WRITE("Test PASSED\n"); + _exit(PTS_PASS); + } } int main(void) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c index 448e5a2..41e9662 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-5.c @@ -47,7 +47,7 @@ int main(void) long page_size; char *pa, ch; - size_t len; + ssize_t len; int fd; pid_t child; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c index 632bd81..15aab50 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-6.c @@ -47,7 +47,7 @@ int main(void) long page_size; char *pa, ch; - size_t len; + ssize_t len; int fd; pid_t child; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c index 5b89cf1..dee97ae 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/12-1.c @@ -37,7 +37,7 @@ int main(void) { char tmpfname[256]; void *pa; - size_t size = 1024; + ssize_t size = 1024; int fd, i; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_12_1_%d", getpid()); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c index fbc2d7e..5976bdb 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/13-1.c @@ -30,6 +30,7 @@ #include <fcntl.h> #include <string.h> #include <errno.h> +#include <time.h> #include "noatime.h" #include "posixtest.h" @@ -39,7 +40,7 @@ int main(void) char *data; void *pa; - size_t size = 1024; + ssize_t size = 1024; int fd; struct stat stat_buff, stat_buff2; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/14-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/14-1.c index b1b061e..8fc8e5d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/14-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/14-1.c @@ -29,6 +29,7 @@ #include <fcntl.h> #include <string.h> #include <errno.h> +#include <time.h> #include "posixtest.h" int main(void) @@ -37,7 +38,7 @@ int main(void) char *data; void *pa; - size_t size = 1024; + ssize_t size = 1024; int fd; struct stat stat_buff; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c index d938885..544406b 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/5-1.c @@ -91,7 +91,8 @@ int main(void) char tmpfname[256]; void *pa; size_t size = 1024; - int fd, i, fail = 0; + int fd, fail = 0; + unsigned int i; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_5_1_%d", getpid()); unlink(tmpfname); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c index 8697aba..c9237d7 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/6-2.c @@ -46,7 +46,7 @@ int main(void) char tmpfname[256]; char *data; void *pa; - size_t size = 1024; + ssize_t size = 1024; int fd; pid_t child; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c index 0236eeb..e501e24 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-1.c @@ -43,7 +43,7 @@ int main(void) char tmpfname[256]; char *data; void *pa; - size_t size = 1024; + ssize_t size = 1024; int fd; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_7_1_%d", getpid()); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c index 4570b39..b52e383 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/7-2.c @@ -43,7 +43,7 @@ int main(void) char tmpfname[256]; char *data; void *pa; - size_t size = 1024; + ssize_t size = 1024; int fd; snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_mmap_7_2_%d", getpid()); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c index 59f1bb6..b7d064b 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/16-1.c @@ -58,7 +58,7 @@ int main(void) fd = open(fname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR); if (fd == -1) { printf(TNAME " Error at open(): %s\n", strerror(errno)); - exit(PTS_UNRESOLVED); + return PTS_UNRESOLVED; } /* file is empty now, will cause "Bus error" */ write(fd, fname, sizeof(int)); @@ -68,7 +68,7 @@ int main(void) if (pa == MAP_FAILED) { printf(TNAME " Error at mmap: %s\n", strerror(errno)); close(fd); - exit(PTS_FAIL); + return PTS_FAIL; } *(int *)pa = 0; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c index c5ef666..57f88dd 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/2-1.c @@ -39,6 +39,7 @@ void handler(int signo) { + (void) signo; return; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c index 84dbae5..09966ec 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/20-1.c @@ -28,6 +28,7 @@ void handler(int signo) { + (void) signo; #ifdef DEBUG printf("in handler\n"); #endif diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c index ccbd1e9..db1e7c4 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/7-2.c @@ -36,6 +36,7 @@ void handler(int signo) { + (void) signo; return; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c index 15405d3..35d1683 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/8-2.c @@ -36,6 +36,7 @@ void handler(int signo) { + (void) signo; return; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c index 53eaa7d..35459b0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mq_open/9-2.c @@ -36,6 +36,7 @@ void handler(int signo) { + (void) signo; return; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c index 98f5bc9..883885d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c @@ -77,12 +77,12 @@ int main(void) } if ((slepts - tssleepfor.tv_sec) > OKSECERR) { - printf("FAIL - slept %lds%ldns >> %lds%ldns\n", + printf("FAIL - slept %ds%dns >> %lds%ldns\n", slepts, sleptns, tssleepfor.tv_sec, tssleepfor.tv_nsec); failure = 1; } else { - printf("PASS - slept %lds%ldns ~= %lds%ldns\n", + printf("PASS - slept %ds%dns ~= %lds%ldns\n", slepts, sleptns, tssleepfor.tv_sec, tssleepfor.tv_nsec); } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c index 17640aa..5f075b2 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/1-1.c @@ -36,6 +36,8 @@ void *t1_func(void *arg) struct timespec timeout; struct timeval curtime; + (void) arg; + if (pthread_mutex_lock(&td.mutex) != 0) { fprintf(stderr, "Thread1: Fail to acquire mutex\n"); exit(PTS_UNRESOLVED); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c index 6e482e0..8237051 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-1.c @@ -43,6 +43,8 @@ void *t1_func(void *arg) struct timespec timeout; struct timeval curtime; + (void) arg; + if (pthread_mutex_lock(&td.mutex) != 0) { fprintf(stderr, "Thread1 failed to acquire the mutex\n"); exit(PTS_UNRESOLVED); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c index d9b5b8a..4006a66 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-2.c @@ -38,6 +38,8 @@ void *t1_func(void *arg) struct timeval curtime; struct timespec timeout; + (void) arg; + fprintf(stderr, "Thread1 started\n"); /* Lock the mutex */ @@ -115,7 +117,7 @@ int main(void) return PTS_UNRESOLVED; } - if ((int)th_ret == PTS_PASS) { + if ((long)th_ret == PTS_PASS) { printf("Test PASSED\n"); return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c index 257b6f8..050f5e4 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-3.c @@ -37,6 +37,8 @@ void *t1_func(void *arg) struct timeval curtime; struct timespec timeout; + (void) arg; + if (pthread_mutex_lock(&td.mutex) != 0) { fprintf(stderr, "Thread1 failed to acquire the mutex\n"); exit(PTS_UNRESOLVED); @@ -108,7 +110,7 @@ int main(void) return PTS_UNRESOLVED; } - switch ((int)th_ret) { + switch ((long)th_ret) { case PTS_PASS: printf("Test PASSED\n"); return PTS_PASS; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c index 6783b37..7e317d2 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-4.c @@ -41,9 +41,6 @@ #ifndef WITHOUT_XOPEN #define _XOPEN_SOURCE 600 #endif - /********************************************************************************************/ -/****************************** standard includes *****************************************/ -/********************************************************************************************/ #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -56,32 +53,9 @@ #include <string.h> #include <time.h> -/********************************************************************************************/ -/****************************** Test framework *****************************************/ -/********************************************************************************************/ #include "../testfrmw/testfrmw.h" #include "../testfrmw/testfrmw.c" - /* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/********************************************************************************************/ -/********************************** Configuration ******************************************/ -/********************************************************************************************/ + #ifndef VERBOSE #define VERBOSE 1 #endif @@ -90,9 +64,6 @@ #define USE_ALTCLK /* make tests with MONOTONIC CLOCK if supported */ #endif -/********************************************************************************************/ -/*********************************** Test case *****************************************/ -/********************************************************************************************/ #ifndef WITHOUT_XOPEN typedef struct { @@ -274,7 +245,8 @@ void *tf(void *arg) int main(void) { - int ret, i; + int ret; + unsigned int i; pthread_mutexattr_t ma; pthread_condattr_t ca; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c index 3956290..4dbb17a 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-5.c @@ -169,7 +169,8 @@ void *threaded(void *arg) int main(void) { - int ret, i, j; + int ret, j; + unsigned int i; pthread_mutexattr_t ma; pthread_condattr_t ca; pthread_t th[NTHREADS]; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c index 6d77ce6..892dc54 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-6.c @@ -34,9 +34,7 @@ #ifndef WITHOUT_XOPEN #define _XOPEN_SOURCE 600 #endif - /********************************************************************************************/ -/****************************** standard includes *****************************************/ -/********************************************************************************************/ + #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -47,32 +45,9 @@ #include <time.h> #include <semaphore.h> -/********************************************************************************************/ -/****************************** Test framework *****************************************/ -/********************************************************************************************/ #include "../testfrmw/testfrmw.h" #include "../testfrmw/testfrmw.c" - /* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/********************************************************************************************/ -/********************************** Configuration ******************************************/ -/********************************************************************************************/ + #ifndef VERBOSE #define VERBOSE 1 #endif @@ -81,10 +56,6 @@ #define USE_ALTCLK /* make tests with MONOTONIC CLOCK if supported */ #endif -/********************************************************************************************/ -/*********************************** Test case *****************************************/ -/********************************************************************************************/ - struct { pthread_mutex_t mtx; pthread_cond_t cnd; @@ -101,6 +72,9 @@ struct { void clnp1(void *arg) { int ret; + + (void) arg; + if (data.type == PTHREAD_MUTEX_RECURSIVE) { ret = pthread_mutex_trylock(&(data.mtx)); if (ret != 0) { @@ -122,6 +96,9 @@ void clnp1(void *arg) void clnp2(void *arg) { int ret; + + (void) arg; + do { ret = sem_post(&(data.semA)); } while ((ret != 0) && (errno == EINTR)); @@ -146,6 +123,8 @@ void clnp3(void *arg) { int ret; + (void) arg; + ret = pthread_mutex_unlock(&(data.mtx)); if (ret != 0) { UNRESOLVED(ret, "Unable to unlock mutex in clean-up handler 3"); @@ -171,6 +150,8 @@ void *threaded(void *arg) { int ret; + (void) arg; + struct timespec ts; ret = clock_gettime(data.cid, &ts); @@ -217,7 +198,8 @@ void *threaded(void *arg) int main(void) { - int ret, i; + int ret; + unsigned int i; void *rc; pthread_mutexattr_t ma; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c index 21e6df5..83e18ae 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/2-7.c @@ -40,9 +40,7 @@ #ifndef WITHOUT_XOPEN #define _XOPEN_SOURCE 600 #endif - /********************************************************************************************/ -/****************************** standard includes *****************************************/ -/********************************************************************************************/ + #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -55,32 +53,9 @@ #include <string.h> #include <time.h> -/********************************************************************************************/ -/****************************** Test framework *****************************************/ -/********************************************************************************************/ #include "../testfrmw/testfrmw.h" #include "../testfrmw/testfrmw.c" - /* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/********************************************************************************************/ -/********************************** Configuration ******************************************/ -/********************************************************************************************/ + #ifndef VERBOSE #define VERBOSE 1 #endif @@ -91,9 +66,6 @@ #define USE_ALTCLK /* make tests with MONOTONIC CLOCK if supported */ #endif -/********************************************************************************************/ -/*********************************** Test case *****************************************/ -/********************************************************************************************/ #ifndef WITHOUT_XOPEN typedef struct { @@ -280,7 +252,8 @@ void *tf(void *arg) int main(void) { - int ret, i; + int ret; + unsigned int i; pthread_mutexattr_t ma; pthread_condattr_t ca; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c index d3f5944..d03e399 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/3-1.c @@ -36,6 +36,8 @@ void *t1_func(void *arg) struct timespec timeout; struct timeval curtime; + (void) arg; + if (pthread_mutex_lock(&td.mutex) != 0) { fprintf(stderr, "Thread1 failed to acquire the mutex\n"); exit(PTS_UNRESOLVED); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c index 83d8e27..43cdf3f 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-1.c @@ -33,6 +33,8 @@ void *t1_func(void *arg) struct timespec timeout; struct timeval curtime; + (void) arg; + if (pthread_mutex_lock(&td.mutex) != 0) { fprintf(stderr, "Thread1 failed to acquire the mutex\n"); exit(PTS_UNRESOLVED); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c index 54c895a..0b29ea0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-2.c @@ -41,9 +41,7 @@ #ifndef WITHOUT_XOPEN #define _XOPEN_SOURCE 600 #endif - /********************************************************************************************/ -/****************************** standard includes *****************************************/ -/********************************************************************************************/ + #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -56,32 +54,9 @@ #include <string.h> #include <time.h> -/********************************************************************************************/ -/****************************** Test framework *****************************************/ -/********************************************************************************************/ #include "../testfrmw/testfrmw.h" #include "../testfrmw/testfrmw.c" - /* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/********************************************************************************************/ -/********************************** Configuration ******************************************/ -/********************************************************************************************/ + #ifndef VERBOSE #define VERBOSE 1 #endif @@ -92,9 +67,6 @@ #define USE_ALTCLK /* make tests with MONOTONIC CLOCK if supported */ #endif -/********************************************************************************************/ -/*********************************** Test case *****************************************/ -/********************************************************************************************/ #ifndef WITHOUT_XOPEN typedef struct { @@ -226,7 +198,8 @@ void *tf(void *arg) int main(void) { - int ret, i, j, k; + int ret, k; + unsigned int i, j; pthread_mutexattr_t ma; pthread_condattr_t ca; pthread_cond_t cnd; diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c index 6a3e868..25c033c 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_timedwait/4-3.c @@ -30,9 +30,6 @@ /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */ #define _POSIX_C_SOURCE 200112L - /********************************************************************************************/ -/****************************** standard includes *****************************************/ -/********************************************************************************************/ #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -44,32 +41,9 @@ #include <signal.h> #include <time.h> -/********************************************************************************************/ -/****************************** Test framework *****************************************/ -/********************************************************************************************/ #include "../testfrmw/testfrmw.h" #include "../testfrmw/testfrmw.c" - /* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/********************************************************************************************/ -/********************************** Configuration ******************************************/ -/********************************************************************************************/ + #define WITH_SYNCHRO #ifndef VERBOSE #define VERBOSE 2 @@ -78,10 +52,6 @@ #define TIMEOUT (1000) /* ns, timeout parameter for pthread_cond_timedwait */ #define INTERVAL (700) /* ns, frequency (actually, period) for the condition signaling */ -/********************************************************************************************/ -/*********************************** Test case *****************************************/ -/********************************************************************************************/ - char do_it = 1; unsigned long count_cnd_sig = 0, count_cnd_wup = 0; #ifdef WITH_SYNCHRO @@ -142,6 +112,7 @@ void *sendsig(void *arg) /* This one is registered for signal SIGUSR1 */ void sighdl1(int sig) { + (void) sig; #ifdef WITH_SYNCHRO if (sem_post(&semsig1)) { UNRESOLVED(errno, "Sem_post in signal handler 1"); @@ -152,6 +123,7 @@ void sighdl1(int sig) /* This one is registered for signal SIGUSR2 */ void sighdl2(int sig) { + (void) sig; #ifdef WITH_SYNCHRO if (sem_post(&semsig2)) { UNRESOLVED(errno, "Sem_post in signal handler 2"); @@ -166,6 +138,8 @@ void *waiter(void *arg) int ret; struct timespec ts; + (void) arg; + /* We don't block the signals SIGUSR1 and SIGUSR2 for this THREAD */ ret = pthread_sigmask(SIG_UNBLOCK, &usersigs, NULL); if (ret != 0) { @@ -219,9 +193,10 @@ void *waiter(void *arg) void *worker(void *arg) { int ret = 0; - struct timespec ts, tsrem; + (void) arg; + /* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */ ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL); if (ret != 0) { diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c index c6117ba..b85ad26 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-1.c @@ -29,7 +29,7 @@ #include "posixtest.h" static pthread_spinlock_t spinlock; -volatile static int thread_state; +static volatile int thread_state; #define NOT_CREATED_THREAD 1 #define ENTERED_THREAD 2 @@ -52,6 +52,8 @@ static void *fn_chld(void *arg) thread_state = ENTERED_THREAD; int cnt = 0; + (void) arg; + /* Unblock the SIGALRM signal for the thread */ sigemptyset(&act.sa_mask); sigaddset(&act.sa_mask, SIGALRM); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c index b19202e..d91806f 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c @@ -29,7 +29,7 @@ #include "posixtest.h" static pthread_spinlock_t spinlock; -volatile static int thread_state; +static volatile int thread_state; #define NOT_CREATED_THREAD 1 #define ENTERED_THREAD 2 @@ -40,6 +40,8 @@ static void *fn_chld(void *arg) int rc = 0; thread_state = ENTERED_THREAD; + (void) arg; + /* Lock the spinlock */ printf("thread: attempt spin lock\n"); rc = pthread_spin_lock(&spinlock); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c index 58cf33e..d1739bf 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-1.c @@ -31,7 +31,7 @@ #include "posixtest.h" static pthread_spinlock_t spinlock; -volatile static int thread_state; +static volatile int thread_state; #define NOT_CREATED_THREAD 1 #define ENTERED_THREAD 2 @@ -42,6 +42,8 @@ static void *fn_chld(void *arg) int rc = 0; thread_state = ENTERED_THREAD; + (void) arg; + printf("thread: attempt trylock\n"); rc = pthread_spin_trylock(&spinlock); if (rc != 0) { diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c index 98482c8..f3c0a6c 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/1-2.c @@ -33,7 +33,7 @@ #include "posixtest.h" static pthread_spinlock_t spinlock; -volatile static int thread_state; +static volatile int thread_state; #define NOT_CREATED_THREAD 1 #define ENTERED_THREAD 2 @@ -44,6 +44,8 @@ static void *fn_chld(void *arg) int rc = 0; thread_state = ENTERED_THREAD; + (void) arg; + printf("thread: attempt spin lock\n"); rc = pthread_spin_lock(&spinlock); if (rc != 0) { diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c index fce841c..4b0a5e6 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_unlock/3-1.c @@ -31,7 +31,7 @@ #include "posixtest.h" static pthread_spinlock_t spinlock; -volatile static int sem; +static volatile int sem; #define INTHREAD 0 #define INMAIN 1 @@ -40,6 +40,8 @@ static void *fn_chld(void *arg) { int rc = 0; + (void) arg; + /* Initialize spin lock */ if (pthread_spin_init(&spinlock, PTHREAD_PROCESS_PRIVATE) != 0) { printf("main: Error at pthread_spin_init()\n"); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c index f0bec0e..41bd3d0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-1.c @@ -1,7 +1,8 @@ /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis - +* Copyright (c) 2013 Cyril Hrubis <ch...@su...> +* * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -13,26 +14,23 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - +* * This sample test aims to check the following assertions: * * If SA_SIGINFO is not set in sa_flags, sa_handler is used as the signal * handling function. - +* * The steps are: * -> register a handler for SIGABRT without SA_SIGINFO, and a known function -* as saèhandler +* as sa_handler * -> raise SIGABRT, and check the function has been called. - +* * The test fails if the function is not called */ /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */ #define _POSIX_C_SOURCE 200112L -/******************************************************************************/ -/*************************** standard includes ********************************/ -/******************************************************************************/ #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -43,97 +41,57 @@ #include <signal.h> #include <errno.h> -/******************************************************************************/ -/*************************** Test framework *******************************/ -/******************************************************************************/ -#include "../testfrmw/testfrmw.h" -#include "../testfrmw/testfrmw.c" -/* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int - * (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/******************************************************************************/ -/**************************** Configuration ***********************************/ -/******************************************************************************/ -#ifndef VERBOSE -#define VERBOSE 1 -#endif - -#define SIGNAL SIGABRT - -/******************************************************************************/ -/*************************** Test case ***********************************/ -/******************************************************************************/ - -int called = 0; -void handler(int sig) +#include "posixtest.h" + +static sig_atomic_t called = 0; + +static void handler() { called = 1; } -/* main function */ int main(void) { int ret; - struct sigaction sa; - /* Initialize output */ - output_init(); - /* Set the signal handler */ sa.sa_flags = 0; sa.sa_handler = handler; ret = sigemptyset(&sa.sa_mask); if (ret != 0) { - UNRESOLVED(ret, "Failed to empty signal set"); + perror("Failed to empty signal set"); + return PTS_UNRESOLVED; } /* Install the signal handler for SIGABRT */ - ret = sigaction(SIGNAL, &sa, 0); + ret = sigaction(SIGABRT, &sa, 0); if (ret != 0) { - UNRESOLVED(ret, "Failed to set signal handler"); + perror("Failed to set signal handler"); + return PTS_UNRESOLVED; } if (called) { - FAILED - ("The signal handler has been called when no signal was raised"); + fprintf(stderr, + "The signal handler has been called before signal was raised"); + return PTS_FAIL; } - ret = raise(SIGNAL); + ret = raise(SIGABRT); if (ret != 0) { - UNRESOLVED(ret, "Failed to raise SIGABRT"); + perror("Failed to raise SIGABRT"); + return PTS_UNRESOLVED; } if (!called) { - FAILED - ("the sa_handler was not called whereas SA_SIGINFO was not set"); + fprintf(stderr, "The sa_handler was not called\n"); + return PTS_FAIL; } - /* Test passed */ -#if VERBOSE > 0 - - output("Test passed\n"); - -#endif + printf("Test PASSED\n"); - PASSED; + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c index f13a319..e595b6d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-10.c @@ -1,7 +1,8 @@ /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis - +* Copyright (c) 2013 Cyril Hrubis <ch...@su...> +* * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -13,26 +14,23 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - +* * This sample test aims to check the following assertions: * * If SA_SIGINFO is not set in sa_flags, sa_handler is used as the signal * handling function. - +* * The steps are: * -> register a handler for SIGPIPE without SA_SIGINFO, and a known function -* as saèhandler +* as sa_handler * -> raise SIGPIPE, and check the function has been called. - +* * The test fails if the function is not called */ /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */ #define _POSIX_C_SOURCE 200112L -/******************************************************************************/ -/*************************** standard includes ********************************/ -/******************************************************************************/ #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -43,97 +41,57 @@ #include <signal.h> #include <errno.h> -/******************************************************************************/ -/*************************** Test framework *******************************/ -/******************************************************************************/ -#include "../testfrmw/testfrmw.h" -#include "../testfrmw/testfrmw.c" -/* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * where descr is a description of the error and ret is an int - * (error code for example) - * FAILED(descr); - * where descr is a short text saying why the test has failed. - * PASSED(); - * No parameter. - * - * Both three macros shall terminate the calling process. - * The testcase shall not terminate in any other maneer. - * - * The other file defines the functions - * void output_init() - * void output(char * string, ...) - * - * Those may be used to output information. - */ - -/******************************************************************************/ -/**************************** Configuration ***********************************/ -/******************************************************************************/ -#ifndef VERBOSE -#define VERBOSE 1 -#endif - -#define SIGNAL SIGPIPE - -/******************************************************************************/ -/*************************** Test case ***********************************/ -/******************************************************************************/ - -int called = 0; -void handler(int sig) +#include "posixtest.h" + +static sig_atomic_t called = 0; + +static void handler() { called = 1; } -/* main function */ int main(void) { int ret; - struct sigaction sa; - /* Initialize output */ - output_init(); - /* Set the signal handler */ sa.sa_flags = 0; sa.sa_handler = handler; ret = sigemptyset(&sa.sa_mask); if (ret != 0) { - UNRESOLVED(ret, "Failed to empty signal set"); + perror("Failed to empty signal set"); + return PTS_UNRESOLVED; } /* Install the signal handler for SIGPIPE */ - ret = sigaction(SIGNAL, &sa, 0); + ret = sigaction(SIGPIPE, &sa, 0); if (ret != 0) { - UNRESOLVED(ret, "Failed to set signal handler"); + perror("Failed to set signal handler"); + return PTS_UNRESOLVED; } if (called) { - FAILED - ("The signal handler has been called when no signal was raised"); + fprintf(stderr, + "The signal handler has been called before signal was raised"); + return PTS_FAIL; } - ret = raise(SIGNAL); + ret = raise(SIGPIPE); if (ret != 0) { - UNRESOLVED(ret, "Failed to raise SIGPIPE"); + perror("Failed to raise SIGPIPE"); + return PTS_UNRESOLVED; } if (!called) { - FAILED - ("the sa_handler was not called whereas SA_SIGINFO was not set"); + fprintf(stderr, "The sa_handler was not called\n"); + return PTS_FAIL; } - /* Test passed */ -#if VERBOSE > 0 - - output("Test passed\n"); - -#endif + printf("Test PASSED\n"); - PASSED; + return PTS_PASS; } diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c index b5889e1..7906c98 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/18-11.c @@ -1,7 +1,8 @@ /* * Copyright (c) 2005, Bull S.A.. All rights reserved. * Created by: Sebastien Decugis - +* Copyright (c) 2013 Cyril Hrubis <ch...@su...> +* * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as * published by the Free Software Foundation. @@ -13,26 +14,23 @@ * You should have received a copy of the GNU General Public License along * with this program; if not, write the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - +* * This sample test aims to check the following assertions: * * If SA_SIGINFO is not set in sa_flags, sa_handler is used as the signal * handling function. - +* * The steps are: * -> register a handler for SIGQUIT without SA_SIGINFO, and a known function -* as saèhandler +* as sa_handler * -> raise SIGQUIT, and check the function has been called. - +* * The test fails if the function is not called */ /* We are testing conformance to IEEE Std 1003.1, 2003 Edition */ #define _POSIX_C_SOURCE 200112L -/******************************************************************************/ -/*************************** standard includes ********************************/ -/******************************************************************************/ #include <pthread.h> #include <stdarg.h> #include <stdio.h> @@ -43,97 +41,57 @@ #include <signal.h> #include <errno.h> -/******************************************************************************/ -/*************************** Test framework *******************************/ -/******************************************************************************/ -#include "../testfrmw/testfrmw.h" -#include "../testfrmw/testfrmw.c" -/* This header is responsible for defining the following macros: - * UNRESOLVED(ret, descr); - * ... [truncated message content] |
From: Cyril H. <su...@li...> - 2013-03-25 19:21:40
|
The branch, master, has been updated via d743731a0789e2ab740caafffa37de8383a3b141 (commit) via 18cee3b05ca8d440e56fc6b225a31ce6b79d56dd (commit) via 7725959daeca6c20601bae2d78b497ceee13b70d (commit) via b0e54beba402681e394306a7fa61b57b1568c2bd (commit) via 33479f1adb1559e35a9a32a954ac797ff65b4d83 (commit) via b9216b0e62d0e676a76db2fe4764a28c2e266f08 (commit) via eabe1193a2e5df113310ed4d02af36a7c4a51f1a (commit) via 4ca2bbdcd3003f3c8df4e6129e9c7b2bd1514f87 (commit) from 8567638ab4af6643389714479977545ba780b762 (commit) - Log ----------------------------------------------------------------- commit d743731a0789e2ab740caafffa37de8383a3b141 Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 19:06:21 2013 +0100 open_posix_testsuite/.../pthread_getschedparam/1-1 * Include stdlib.h for exit() * Remove parameter definition from thread function commit 18cee3b05ca8d440e56fc6b225a31ce6b79d56dd Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 18:10:02 2013 +0100 openposix/.../pthread_create,pthread_exit: Fix. Fix the preprocessor in pthread_create/3-2.c and pthread_exit/6-1.c. I shouldn't have done such dumb mistake, my apologies. Signed-off-by: Cyril Hrubis <ch...@su...> commit 7725959daeca6c20601bae2d78b497ceee13b70d Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 18:05:08 2013 +0100 open_posix_testsuite/.../pthread_cond_init/2-1 * Include stdio.h for printf() * Declare the cond variable as non-static (as it is unused intentionally) Signed-off-by: Cyril Hrubis <ch...@su...> commit b0e54beba402681e394306a7fa61b57b1568c2bd Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 18:01:18 2013 +0100 open_posix_testsuite/.../pthread_attr_setstacksize/2-1 * Fix printf() format string. Signed-off-by: Cyril Hrubis <ch...@su...> commit 33479f1adb1559e35a9a32a954ac797ff65b4d83 Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 17:58:12 2013 +0100 open_posix_testsuite/.../pthread_attr_setstack/2-1 * Fix printf() format string Signed-off-by: Cyril Hrubis <ch...@su...> commit b9216b0e62d0e676a76db2fe4764a28c2e266f08 Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 17:55:26 2013 +0100 open_posix_testsuite/.../pthread_attr_setscope/5-1 * Change exit() to plain return Signed-off-by: Cyril Hrubis <ch...@su...> commit eabe1193a2e5df113310ed4d02af36a7c4a51f1a Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 17:53:46 2013 +0100 open_posix_testsuite/.../pthread_attr_setschedpolicy/4-1 * Include string.h for strerror() * Change exit() to plain return Signed-off-by: Cyril Hrubis <ch...@su...> commit 4ca2bbdcd3003f3c8df4e6129e9c7b2bd1514f87 Author: Cyril Hrubis <ch...@su...> Date: Mon Mar 25 17:26:44 2013 +0100 open_posix_testsuite/conformace/interfaces: Fix. Change the main() and main(argc, argv) to main(void). This fixes a lot of warnings in the latter case. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/aio_cancel/1-1.c | 2 +- .../conformance/interfaces/aio_cancel/10-1.c | 2 +- .../conformance/interfaces/aio_cancel/2-1.c | 2 +- .../conformance/interfaces/aio_cancel/2-2.c | 2 +- .../conformance/interfaces/aio_cancel/4-1.c | 2 +- .../conformance/interfaces/aio_cancel/5-1.c | 2 +- .../conformance/interfaces/aio_cancel/6-1.c | 2 +- .../conformance/interfaces/aio_cancel/8-1.c | 2 +- .../conformance/interfaces/aio_cancel/9-1.c | 2 +- .../conformance/interfaces/aio_error/1-1.c | 2 +- .../conformance/interfaces/aio_error/2-1.c | 2 +- .../conformance/interfaces/aio_error/3-1.c | 2 +- .../conformance/interfaces/aio_fsync/12-1.c | 2 +- .../conformance/interfaces/aio_fsync/14-1.c | 2 +- .../conformance/interfaces/aio_fsync/3-1.c | 2 +- .../conformance/interfaces/aio_fsync/4-1.c | 2 +- .../conformance/interfaces/aio_fsync/5-1.c | 2 +- .../conformance/interfaces/aio_fsync/8-1.c | 2 +- .../conformance/interfaces/aio_fsync/8-2.c | 2 +- .../conformance/interfaces/aio_fsync/8-3.c | 2 +- .../conformance/interfaces/aio_fsync/8-4.c | 2 +- .../conformance/interfaces/aio_fsync/9-1.c | 2 +- .../conformance/interfaces/aio_read/1-1.c | 2 +- .../conformance/interfaces/aio_read/10-1.c | 2 +- .../conformance/interfaces/aio_read/11-1.c | 2 +- .../conformance/interfaces/aio_read/11-2.c | 2 +- .../conformance/interfaces/aio_read/3-1.c | 2 +- .../conformance/interfaces/aio_read/3-2.c | 2 +- .../conformance/interfaces/aio_read/4-1.c | 2 +- .../conformance/interfaces/aio_read/5-1.c | 2 +- .../conformance/interfaces/aio_read/7-1.c | 2 +- .../conformance/interfaces/aio_read/8-1.c | 2 +- .../conformance/interfaces/aio_read/9-1.c | 2 +- .../conformance/interfaces/aio_suspend/3-1.c | 2 +- .../conformance/interfaces/aio_suspend/4-1.c | 2 +- .../conformance/interfaces/aio_suspend/5-1.c | 2 +- .../conformance/interfaces/aio_suspend/9-1.c | 2 +- .../conformance/interfaces/aio_write/1-1.c | 2 +- .../conformance/interfaces/aio_write/1-2.c | 2 +- .../conformance/interfaces/aio_write/2-1.c | 2 +- .../conformance/interfaces/aio_write/3-1.c | 2 +- .../conformance/interfaces/aio_write/5-1.c | 2 +- .../conformance/interfaces/aio_write/6-1.c | 2 +- .../conformance/interfaces/aio_write/7-1.c | 2 +- .../conformance/interfaces/aio_write/8-1.c | 2 +- .../conformance/interfaces/aio_write/8-2.c | 2 +- .../conformance/interfaces/aio_write/9-1.c | 2 +- .../conformance/interfaces/aio_write/9-2.c | 2 +- .../conformance/interfaces/asctime/1-1.c | 2 +- .../conformance/interfaces/ctime/1-1.c | 2 +- .../conformance/interfaces/difftime/1-1.c | 2 +- .../conformance/interfaces/fsync/4-1.c | 2 +- .../conformance/interfaces/fsync/5-1.c | 2 +- .../conformance/interfaces/fsync/7-1.c | 2 +- .../conformance/interfaces/gmtime/1-1.c | 2 +- .../conformance/interfaces/gmtime/2-1.c | 2 +- .../conformance/interfaces/lio_listio/1-1.c | 2 +- .../conformance/interfaces/lio_listio/10-1.c | 2 +- .../conformance/interfaces/lio_listio/11-1.c | 2 +- .../conformance/interfaces/lio_listio/12-1.c | 2 +- .../conformance/interfaces/lio_listio/13-1.c | 2 +- .../conformance/interfaces/lio_listio/14-1.c | 2 +- .../conformance/interfaces/lio_listio/15-1.c | 2 +- .../conformance/interfaces/lio_listio/18-1.c | 2 +- .../conformance/interfaces/lio_listio/2-1.c | 2 +- .../conformance/interfaces/lio_listio/3-1.c | 2 +- .../conformance/interfaces/lio_listio/4-1.c | 2 +- .../conformance/interfaces/lio_listio/5-1.c | 2 +- .../conformance/interfaces/lio_listio/6-1.c | 2 +- .../conformance/interfaces/lio_listio/7-1.c | 2 +- .../conformance/interfaces/lio_listio/8-1.c | 2 +- .../conformance/interfaces/lio_listio/9-1.c | 2 +- .../conformance/interfaces/localtime/1-1.c | 2 +- .../conformance/interfaces/mlock/10-1.c | 2 +- .../conformance/interfaces/mlock/12-1.c | 2 +- .../conformance/interfaces/mlock/5-1.c | 2 +- .../conformance/interfaces/mlock/8-1.c | 2 +- .../interfaces/mlock/speculative/12-1.c | 2 +- .../interfaces/mlockall/speculative/15-1.c | 2 +- .../conformance/interfaces/mq_close/1-1.c | 2 +- .../conformance/interfaces/mq_close/2-1.c | 2 +- .../conformance/interfaces/mq_close/3-1.c | 2 +- .../conformance/interfaces/mq_close/3-2.c | 2 +- .../conformance/interfaces/mq_close/3-3.c | 2 +- .../conformance/interfaces/mq_close/4-1.c | 2 +- .../conformance/interfaces/mq_getattr/2-1.c | 2 +- .../conformance/interfaces/mq_getattr/2-2.c | 2 +- .../conformance/interfaces/mq_getattr/3-1.c | 2 +- .../conformance/interfaces/mq_getattr/4-1.c | 2 +- .../conformance/interfaces/mq_notify/1-1.c | 2 +- .../conformance/interfaces/mq_notify/2-1.c | 2 +- .../conformance/interfaces/mq_notify/3-1.c | 2 +- .../conformance/interfaces/mq_notify/4-1.c | 2 +- .../conformance/interfaces/mq_notify/5-1.c | 2 +- .../conformance/interfaces/mq_notify/8-1.c | 2 +- .../conformance/interfaces/mq_notify/9-1.c | 2 +- .../conformance/interfaces/mq_open/1-1.c | 2 +- .../conformance/interfaces/mq_open/11-1.c | 2 +- .../conformance/interfaces/mq_open/12-1.c | 2 +- .../conformance/interfaces/mq_open/13-1.c | 2 +- .../conformance/interfaces/mq_open/15-1.c | 2 +- .../conformance/interfaces/mq_open/16-1.c | 2 +- .../conformance/interfaces/mq_open/18-1.c | 2 +- .../conformance/interfaces/mq_open/19-1.c | 2 +- .../conformance/interfaces/mq_open/2-1.c | 2 +- .../conformance/interfaces/mq_open/20-1.c | 2 +- .../conformance/interfaces/mq_open/21-1.c | 2 +- .../conformance/interfaces/mq_open/23-1.c | 2 +- .../conformance/interfaces/mq_open/25-2.c | 2 +- .../conformance/interfaces/mq_open/27-1.c | 2 +- .../conformance/interfaces/mq_open/27-2.c | 2 +- .../conformance/interfaces/mq_open/29-1.c | 2 +- .../conformance/interfaces/mq_open/3-1.c | 2 +- .../conformance/interfaces/mq_open/7-1.c | 2 +- .../conformance/interfaces/mq_open/7-2.c | 2 +- .../conformance/interfaces/mq_open/7-3.c | 2 +- .../conformance/interfaces/mq_open/8-1.c | 2 +- .../conformance/interfaces/mq_open/8-2.c | 2 +- .../conformance/interfaces/mq_open/9-1.c | 2 +- .../conformance/interfaces/mq_open/9-2.c | 2 +- .../interfaces/mq_open/speculative/2-2.c | 2 +- .../interfaces/mq_open/speculative/2-3.c | 2 +- .../interfaces/mq_open/speculative/26-1.c | 2 +- .../interfaces/mq_open/speculative/6-1.c | 2 +- .../conformance/interfaces/mq_receive/1-1.c | 2 +- .../conformance/interfaces/mq_receive/10-1.c | 2 +- .../conformance/interfaces/mq_receive/11-1.c | 2 +- .../conformance/interfaces/mq_receive/11-2.c | 2 +- .../conformance/interfaces/mq_receive/12-1.c | 2 +- .../conformance/interfaces/mq_receive/13-1.c | 2 +- .../conformance/interfaces/mq_receive/2-1.c | 2 +- .../conformance/interfaces/mq_receive/5-1.c | 2 +- .../conformance/interfaces/mq_receive/7-1.c | 2 +- .../conformance/interfaces/mq_receive/8-1.c | 2 +- .../conformance/interfaces/mq_send/1-1.c | 2 +- .../conformance/interfaces/mq_send/10-1.c | 2 +- .../conformance/interfaces/mq_send/11-1.c | 2 +- .../conformance/interfaces/mq_send/11-2.c | 2 +- .../conformance/interfaces/mq_send/12-1.c | 2 +- .../conformance/interfaces/mq_send/13-1.c | 2 +- .../conformance/interfaces/mq_send/14-1.c | 2 +- .../conformance/interfaces/mq_send/2-1.c | 2 +- .../conformance/interfaces/mq_send/3-1.c | 2 +- .../conformance/interfaces/mq_send/3-2.c | 2 +- .../conformance/interfaces/mq_send/4-1.c | 2 +- .../conformance/interfaces/mq_send/4-2.c | 2 +- .../conformance/interfaces/mq_send/4-3.c | 2 +- .../conformance/interfaces/mq_send/5-1.c | 2 +- .../conformance/interfaces/mq_send/5-2.c | 2 +- .../conformance/interfaces/mq_send/7-1.c | 2 +- .../conformance/interfaces/mq_send/8-1.c | 2 +- .../conformance/interfaces/mq_send/9-1.c | 2 +- .../conformance/interfaces/mq_setattr/1-1.c | 2 +- .../conformance/interfaces/mq_setattr/1-2.c | 2 +- .../conformance/interfaces/mq_setattr/2-1.c | 2 +- .../conformance/interfaces/mq_setattr/5-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/1-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/10-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/10-2.c | 2 +- .../conformance/interfaces/mq_timedreceive/11-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/13-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/14-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/15-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/17-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/17-2.c | 2 +- .../conformance/interfaces/mq_timedreceive/17-3.c | 2 +- .../conformance/interfaces/mq_timedreceive/18-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/18-2.c | 2 +- .../conformance/interfaces/mq_timedreceive/2-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/5-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/5-2.c | 2 +- .../conformance/interfaces/mq_timedreceive/5-3.c | 2 +- .../conformance/interfaces/mq_timedreceive/7-1.c | 2 +- .../conformance/interfaces/mq_timedreceive/8-1.c | 2 +- .../interfaces/mq_timedreceive/speculative/10-2.c | 2 +- .../conformance/interfaces/mq_timedsend/1-1.c | 2 +- .../conformance/interfaces/mq_timedsend/10-1.c | 2 +- .../conformance/interfaces/mq_timedsend/11-1.c | 2 +- .../conformance/interfaces/mq_timedsend/11-2.c | 2 +- .../conformance/interfaces/mq_timedsend/12-1.c | 2 +- .../conformance/interfaces/mq_timedsend/13-1.c | 2 +- .../conformance/interfaces/mq_timedsend/14-1.c | 2 +- .../conformance/interfaces/mq_timedsend/15-1.c | 2 +- .../conformance/interfaces/mq_timedsend/16-1.c | 2 +- .../conformance/interfaces/mq_timedsend/18-1.c | 2 +- .../conformance/interfaces/mq_timedsend/19-1.c | 2 +- .../conformance/interfaces/mq_timedsend/2-1.c | 2 +- .../conformance/interfaces/mq_timedsend/20-1.c | 2 +- .../conformance/interfaces/mq_timedsend/3-1.c | 2 +- .../conformance/interfaces/mq_timedsend/3-2.c | 2 +- .../conformance/interfaces/mq_timedsend/4-1.c | 2 +- .../conformance/interfaces/mq_timedsend/4-2.c | 2 +- .../conformance/interfaces/mq_timedsend/4-3.c | 2 +- .../conformance/interfaces/mq_timedsend/5-1.c | 2 +- .../conformance/interfaces/mq_timedsend/5-2.c | 2 +- .../conformance/interfaces/mq_timedsend/5-3.c | 2 +- .../conformance/interfaces/mq_timedsend/7-1.c | 2 +- .../conformance/interfaces/mq_timedsend/8-1.c | 2 +- .../conformance/interfaces/mq_timedsend/9-1.c | 2 +- .../interfaces/mq_timedsend/speculative/18-2.c | 2 +- .../conformance/interfaces/mq_unlink/1-1.c | 2 +- .../conformance/interfaces/mq_unlink/2-1.c | 2 +- .../conformance/interfaces/mq_unlink/2-2.c | 2 +- .../conformance/interfaces/mq_unlink/7-1.c | 2 +- .../interfaces/mq_unlink/speculative/7-2.c | 2 +- .../conformance/interfaces/munlock/10-1.c | 2 +- .../conformance/interfaces/munlock/11-1.c | 2 +- .../conformance/interfaces/munlock/7-1.c | 2 +- .../conformance/interfaces/munlockall/5-1.c | 6 +++--- .../conformance/interfaces/munmap/1-1.c | 2 +- .../conformance/interfaces/munmap/1-2.c | 2 +- .../conformance/interfaces/munmap/2-1.c | 2 +- .../conformance/interfaces/munmap/3-1.c | 2 +- .../conformance/interfaces/munmap/4-1.c | 2 +- .../conformance/interfaces/munmap/8-1.c | 2 +- .../conformance/interfaces/munmap/9-1.c | 2 +- .../conformance/interfaces/nanosleep/1-1.c | 2 +- .../conformance/interfaces/nanosleep/1-2.c | 2 +- .../conformance/interfaces/nanosleep/1-3.c | 2 +- .../conformance/interfaces/nanosleep/10000-1.c | 2 +- .../conformance/interfaces/nanosleep/2-1.c | 2 +- .../conformance/interfaces/nanosleep/3-1.c | 2 +- .../conformance/interfaces/nanosleep/3-2.c | 2 +- .../conformance/interfaces/nanosleep/5-1.c | 2 +- .../conformance/interfaces/nanosleep/5-2.c | 2 +- .../conformance/interfaces/nanosleep/6-1.c | 2 +- .../conformance/interfaces/nanosleep/7-1.c | 2 +- .../conformance/interfaces/nanosleep/7-2.c | 2 +- .../conformance/interfaces/pthread_atfork/1-1.c | 2 +- .../conformance/interfaces/pthread_atfork/1-2.c | 2 +- .../conformance/interfaces/pthread_atfork/2-1.c | 2 +- .../conformance/interfaces/pthread_atfork/2-2.c | 2 +- .../conformance/interfaces/pthread_atfork/3-2.c | 2 +- .../conformance/interfaces/pthread_atfork/3-3.c | 2 +- .../conformance/interfaces/pthread_atfork/4-1.c | 2 +- .../interfaces/pthread_attr_destroy/1-1.c | 2 +- .../interfaces/pthread_attr_destroy/2-1.c | 2 +- .../interfaces/pthread_attr_destroy/3-1.c | 2 +- .../interfaces/pthread_attr_getdetachstate/1-1.c | 2 +- .../interfaces/pthread_attr_getdetachstate/1-2.c | 2 +- .../interfaces/pthread_attr_getinheritsched/1-1.c | 2 +- .../interfaces/pthread_attr_getschedparam/1-1.c | 2 +- .../interfaces/pthread_attr_getschedpolicy/2-1.c | 2 +- .../interfaces/pthread_attr_getscope/1-1.c | 2 +- .../interfaces/pthread_attr_getstack/1-1.c | 2 +- .../interfaces/pthread_attr_getstacksize/1-1.c | 2 +- .../conformance/interfaces/pthread_attr_init/1-1.c | 2 +- .../conformance/interfaces/pthread_attr_init/2-1.c | 2 +- .../conformance/interfaces/pthread_attr_init/3-1.c | 2 +- .../conformance/interfaces/pthread_attr_init/4-1.c | 2 +- .../interfaces/pthread_attr_setdetachstate/1-1.c | 2 +- .../interfaces/pthread_attr_setdetachstate/1-2.c | 2 +- .../interfaces/pthread_attr_setdetachstate/2-1.c | 2 +- .../interfaces/pthread_attr_setdetachstate/4-1.c | 2 +- .../interfaces/pthread_attr_setinheritsched/1-1.c | 2 +- .../interfaces/pthread_attr_setinheritsched/2-1.c | 2 +- .../interfaces/pthread_attr_setinheritsched/2-2.c | 2 +- .../interfaces/pthread_attr_setinheritsched/2-3.c | 2 +- .../interfaces/pthread_attr_setinheritsched/2-4.c | 2 +- .../interfaces/pthread_attr_setinheritsched/4-1.c | 2 +- .../interfaces/pthread_attr_setschedparam/1-1.c | 2 +- .../interfaces/pthread_attr_setschedparam/1-2.c | 2 +- .../interfaces/pthread_attr_setschedparam/1-3.c | 2 +- .../interfaces/pthread_attr_setschedparam/1-4.c | 2 +- .../pthread_attr_setschedparam/speculative/3-1.c | 2 +- .../pthread_attr_setschedparam/speculative/3-2.c | 2 +- .../interfaces/pthread_attr_setschedpolicy/4-1.c | 3 ++- .../interfaces/pthread_attr_setscope/1-1.c | 2 +- .../interfaces/pthread_attr_setscope/4-1.c | 2 +- .../interfaces/pthread_attr_setscope/5-1.c | 2 +- .../interfaces/pthread_attr_setstack/1-1.c | 2 +- .../interfaces/pthread_attr_setstack/2-1.c | 4 ++-- .../interfaces/pthread_attr_setstack/4-1.c | 2 +- .../interfaces/pthread_attr_setstack/6-1.c | 2 +- .../interfaces/pthread_attr_setstack/7-1.c | 2 +- .../interfaces/pthread_attr_setstacksize/1-1.c | 2 +- .../interfaces/pthread_attr_setstacksize/2-1.c | 2 +- .../interfaces/pthread_attr_setstacksize/4-1.c | 2 +- .../interfaces/pthread_barrier_destroy/1-1.c | 2 +- .../interfaces/pthread_barrier_destroy/2-1.c | 2 +- .../interfaces/pthread_barrier_init/1-1.c | 2 +- .../interfaces/pthread_barrier_init/3-1.c | 2 +- .../interfaces/pthread_barrier_init/4-1.c | 2 +- .../interfaces/pthread_barrier_wait/1-1.c | 2 +- .../interfaces/pthread_barrier_wait/2-1.c | 2 +- .../interfaces/pthread_barrier_wait/3-1.c | 2 +- .../interfaces/pthread_barrier_wait/3-2.c | 2 +- .../interfaces/pthread_barrier_wait/6-1.c | 2 +- .../interfaces/pthread_barrierattr_destroy/1-1.c | 2 +- .../pthread_barrierattr_getpshared/1-1.c | 2 +- .../pthread_barrierattr_getpshared/2-1.c | 2 +- .../interfaces/pthread_barrierattr_init/1-1.c | 2 +- .../interfaces/pthread_barrierattr_init/2-1.c | 2 +- .../pthread_barrierattr_setpshared/1-1.c | 2 +- .../pthread_barrierattr_setpshared/2-1.c | 2 +- .../conformance/interfaces/pthread_cancel/1-1.c | 2 +- .../conformance/interfaces/pthread_cancel/1-2.c | 2 +- .../conformance/interfaces/pthread_cancel/1-3.c | 2 +- .../conformance/interfaces/pthread_cancel/2-1.c | 2 +- .../conformance/interfaces/pthread_cancel/2-2.c | 2 +- .../conformance/interfaces/pthread_cancel/2-3.c | 2 +- .../conformance/interfaces/pthread_cancel/3-1.c | 2 +- .../conformance/interfaces/pthread_cancel/4-1.c | 2 +- .../conformance/interfaces/pthread_cancel/5-1.c | 2 +- .../interfaces/pthread_cleanup_pop/1-1.c | 2 +- .../interfaces/pthread_cleanup_pop/1-2.c | 2 +- .../interfaces/pthread_cleanup_pop/1-3.c | 2 +- .../interfaces/pthread_cleanup_push/1-1.c | 2 +- .../interfaces/pthread_cleanup_push/1-2.c | 2 +- .../interfaces/pthread_cleanup_push/1-3.c | 2 +- .../interfaces/pthread_cond_broadcast/1-1.c | 2 +- .../interfaces/pthread_cond_broadcast/1-2.c | 2 +- .../interfaces/pthread_cond_broadcast/2-1.c | 2 +- .../interfaces/pthread_cond_broadcast/2-2.c | 2 +- .../interfaces/pthread_cond_broadcast/2-3.c | 2 +- .../interfaces/pthread_cond_broadcast/4-1.c | 2 +- .../interfaces/pthread_cond_broadcast/4-2.c | 2 +- .../interfaces/pthread_cond_destroy/1-1.c | 2 +- .../interfaces/pthread_cond_destroy/2-1.c | 2 +- .../interfaces/pthread_cond_destroy/3-1.c | 2 +- .../pthread_cond_destroy/speculative/4-1.c | 2 +- .../conformance/interfaces/pthread_cond_init/2-1.c | 3 ++- .../interfaces/pthread_cond_signal/1-1.c | 2 +- .../interfaces/pthread_cond_signal/1-2.c | 2 +- .../interfaces/pthread_cond_signal/2-1.c | 2 +- .../interfaces/pthread_cond_signal/2-2.c | 2 +- .../interfaces/pthread_cond_signal/4-1.c | 2 +- .../interfaces/pthread_cond_signal/4-2.c | 2 +- .../interfaces/pthread_cond_timedwait/1-1.c | 2 +- .../interfaces/pthread_cond_timedwait/2-1.c | 2 +- .../interfaces/pthread_cond_timedwait/2-4.c | 4 ++-- .../interfaces/pthread_cond_timedwait/2-5.c | 4 ++-- .../interfaces/pthread_cond_timedwait/2-6.c | 2 +- .../interfaces/pthread_cond_timedwait/2-7.c | 4 ++-- .../interfaces/pthread_cond_timedwait/3-1.c | 2 +- .../interfaces/pthread_cond_timedwait/4-1.c | 2 +- .../interfaces/pthread_cond_timedwait/4-2.c | 4 ++-- .../interfaces/pthread_cond_timedwait/4-3.c | 2 +- .../conformance/interfaces/pthread_cond_wait/1-1.c | 2 +- .../conformance/interfaces/pthread_cond_wait/2-1.c | 2 +- .../conformance/interfaces/pthread_cond_wait/2-2.c | 4 ++-- .../conformance/interfaces/pthread_cond_wait/2-3.c | 2 +- .../conformance/interfaces/pthread_cond_wait/3-1.c | 2 +- .../conformance/interfaces/pthread_cond_wait/4-1.c | 2 +- .../interfaces/pthread_condattr_destroy/1-1.c | 2 +- .../interfaces/pthread_condattr_destroy/2-1.c | 2 +- .../interfaces/pthread_condattr_destroy/3-1.c | 2 +- .../interfaces/pthread_condattr_destroy/4-1.c | 2 +- .../interfaces/pthread_condattr_getclock/1-1.c | 2 +- .../interfaces/pthread_condattr_getclock/1-2.c | 2 +- .../interfaces/pthread_condattr_getpshared/1-1.c | 2 +- .../interfaces/pthread_condattr_getpshared/1-2.c | 2 +- .../interfaces/pthread_condattr_getpshared/2-1.c | 2 +- .../interfaces/pthread_condattr_init/1-1.c | 2 +- .../interfaces/pthread_condattr_init/3-1.c | 2 +- .../interfaces/pthread_condattr_setclock/1-1.c | 2 +- .../interfaces/pthread_condattr_setclock/1-2.c | 2 +- .../interfaces/pthread_condattr_setclock/1-3.c | 2 +- .../interfaces/pthread_condattr_setclock/2-1.c | 2 +- .../interfaces/pthread_condattr_setpshared/1-1.c | 2 +- .../interfaces/pthread_condattr_setpshared/1-2.c | 2 +- .../interfaces/pthread_condattr_setpshared/2-1.c | 2 +- .../conformance/interfaces/pthread_create/1-1.c | 2 +- .../conformance/interfaces/pthread_create/1-2.c | 2 +- .../conformance/interfaces/pthread_create/1-3.c | 2 +- .../conformance/interfaces/pthread_create/1-4.c | 2 +- .../conformance/interfaces/pthread_create/11-1.c | 2 +- .../conformance/interfaces/pthread_create/12-1.c | 2 +- .../conformance/interfaces/pthread_create/14-1.c | 2 +- .../conformance/interfaces/pthread_create/2-1.c | 2 +- .../conformance/interfaces/pthread_create/3-1.c | 2 +- .../conformance/interfaces/pthread_create/3-2.c | 4 ++-- .../conformance/interfaces/pthread_create/4-1.c | 2 +- .../conformance/interfaces/pthread_create/5-1.c | 2 +- .../conformance/interfaces/pthread_create/5-2.c | 2 +- .../conformance/interfaces/pthread_create/8-1.c | 2 +- .../conformance/interfaces/pthread_create/8-2.c | 2 +- .../conformance/interfaces/pthread_detach/1-1.c | 2 +- .../conformance/interfaces/pthread_detach/1-2.c | 2 +- .../conformance/interfaces/pthread_detach/2-1.c | 2 +- .../conformance/interfaces/pthread_detach/2-2.c | 2 +- .../conformance/interfaces/pthread_detach/3-1.c | 2 +- .../conformance/interfaces/pthread_detach/4-1.c | 2 +- .../conformance/interfaces/pthread_detach/4-2.c | 2 +- .../conformance/interfaces/pthread_detach/4-3.c | 2 +- .../conformance/interfaces/pthread_equal/1-1.c | 2 +- .../conformance/interfaces/pthread_equal/1-2.c | 2 +- .../conformance/interfaces/pthread_equal/2-1.c | 2 +- .../conformance/interfaces/pthread_exit/1-1.c | 2 +- .../conformance/interfaces/pthread_exit/1-2.c | 2 +- .../conformance/interfaces/pthread_exit/2-1.c | 2 +- .../conformance/interfaces/pthread_exit/2-2.c | 2 +- .../conformance/interfaces/pthread_exit/3-1.c | 2 +- .../conformance/interfaces/pthread_exit/3-2.c | 2 +- .../conformance/interfaces/pthread_exit/4-1.c | 2 +- .../conformance/interfaces/pthread_exit/5-1.c | 2 +- .../conformance/interfaces/pthread_exit/6-1.c | 4 ++-- .../interfaces/pthread_getcpuclockid/1-1.c | 2 +- .../pthread_getcpuclockid/speculative/3-1.c | 2 +- .../interfaces/pthread_getschedparam/1-1.c | 3 ++- .../interfaces/pthread_getschedparam/1-2.c | 2 +- .../interfaces/pthread_getspecific/1-1.c | 2 +- .../interfaces/pthread_getspecific/3-1.c | 2 +- .../conformance/interfaces/pthread_join/1-1.c | 2 +- .../conformance/interfaces/pthread_join/1-2.c | 2 +- .../conformance/interfaces/pthread_join/2-1.c | 2 +- .../conformance/interfaces/pthread_join/3-1.c | 2 +- .../conformance/interfaces/pthread_join/4-1.c | 2 +- .../conformance/interfaces/pthread_join/5-1.c | 2 +- .../conformance/interfaces/pthread_join/6-2.c | 2 +- .../conformance/interfaces/pthread_join/6-3.c | 2 +- .../interfaces/pthread_join/speculative/6-1.c | 2 +- .../interfaces/pthread_key_create/1-1.c | 2 +- .../interfaces/pthread_key_create/1-2.c | 2 +- .../interfaces/pthread_key_create/2-1.c | 2 +- .../interfaces/pthread_key_create/3-1.c | 2 +- .../pthread_key_create/speculative/5-1.c | 2 +- .../interfaces/pthread_key_delete/1-1.c | 2 +- .../interfaces/pthread_key_delete/1-2.c | 2 +- .../interfaces/pthread_key_delete/2-1.c | 2 +- .../conformance/interfaces/pthread_kill/1-1.c | 2 +- .../conformance/interfaces/pthread_kill/1-2.c | 2 +- .../conformance/interfaces/pthread_kill/2-1.c | 2 +- .../conformance/interfaces/pthread_kill/3-1.c | 2 +- .../conformance/interfaces/pthread_kill/6-1.c | 2 +- .../conformance/interfaces/pthread_kill/7-1.c | 2 +- .../conformance/interfaces/pthread_kill/8-1.c | 2 +- .../interfaces/pthread_mutex_destroy/1-1.c | 2 +- .../interfaces/pthread_mutex_destroy/2-1.c | 2 +- .../interfaces/pthread_mutex_destroy/2-2.c | 4 ++-- .../interfaces/pthread_mutex_destroy/3-1.c | 2 +- .../interfaces/pthread_mutex_destroy/5-1.c | 2 +- .../interfaces/pthread_mutex_destroy/5-2.c | 4 ++-- .../pthread_mutex_destroy/speculative/4-2.c | 2 +- .../interfaces/pthread_mutex_init/1-1.c | 2 +- .../interfaces/pthread_mutex_init/1-2.c | 2 +- .../interfaces/pthread_mutex_init/2-1.c | 2 +- .../interfaces/pthread_mutex_init/3-1.c | 2 +- .../interfaces/pthread_mutex_init/3-2.c | 2 +- .../interfaces/pthread_mutex_init/4-1.c | 2 +- .../interfaces/pthread_mutex_init/5-1.c | 4 ++-- .../pthread_mutex_init/speculative/5-2.c | 2 +- .../interfaces/pthread_mutex_lock/1-1.c | 2 +- .../interfaces/pthread_mutex_lock/2-1.c | 2 +- .../interfaces/pthread_mutex_lock/3-1.c | 2 +- .../interfaces/pthread_mutex_lock/4-1.c | 4 ++-- .../interfaces/pthread_mutex_lock/5-1.c | 2 +- .../interfaces/pthread_mutex_timedlock/1-1.c | 2 +- .../interfaces/pthread_mutex_timedlock/2-1.c | 2 +- .../interfaces/pthread_mutex_timedlock/4-1.c | 2 +- .../interfaces/pthread_mutex_timedlock/5-1.c | 2 +- .../interfaces/pthread_mutex_timedlock/5-2.c | 2 +- .../interfaces/pthread_mutex_timedlock/5-3.c | 2 +- .../interfaces/pthread_mutex_trylock/1-1.c | 2 +- .../interfaces/pthread_mutex_trylock/1-2.c | 2 +- .../interfaces/pthread_mutex_trylock/2-1.c | 4 ++-- .../interfaces/pthread_mutex_trylock/3-1.c | 2 +- .../interfaces/pthread_mutex_trylock/4-1.c | 2 +- .../interfaces/pthread_mutex_trylock/4-2.c | 2 +- .../interfaces/pthread_mutex_trylock/4-3.c | 2 +- .../interfaces/pthread_mutex_unlock/1-1.c | 2 +- .../interfaces/pthread_mutex_unlock/2-1.c | 2 +- .../interfaces/pthread_mutex_unlock/3-1.c | 2 +- .../interfaces/pthread_mutex_unlock/5-1.c | 4 ++-- .../interfaces/pthread_mutex_unlock/5-2.c | 4 ++-- .../interfaces/pthread_mutexattr_destroy/1-1.c | 2 +- .../interfaces/pthread_mutexattr_destroy/2-1.c | 2 +- .../interfaces/pthread_mutexattr_destroy/3-1.c | 2 +- .../interfaces/pthread_mutexattr_destroy/4-1.c | 2 +- .../pthread_mutexattr_getprioceiling/1-1.c | 2 +- .../pthread_mutexattr_getprioceiling/1-2.c | 2 +- .../pthread_mutexattr_getprioceiling/3-1.c | 2 +- .../interfaces/pthread_mutexattr_getprotocol/1-1.c | 2 +- .../interfaces/pthread_mutexattr_getprotocol/1-2.c | 2 +- .../interfaces/pthread_mutexattr_getpshared/1-1.c | 2 +- .../interfaces/pthread_mutexattr_getpshared/1-2.c | 2 +- .../interfaces/pthread_mutexattr_getpshared/1-3.c | 2 +- .../interfaces/pthread_mutexattr_getpshared/3-1.c | 2 +- .../interfaces/pthread_mutexattr_gettype/1-1.c | 2 +- .../interfaces/pthread_mutexattr_gettype/1-2.c | 2 +- .../interfaces/pthread_mutexattr_gettype/1-3.c | 2 +- .../interfaces/pthread_mutexattr_gettype/1-4.c | 2 +- .../interfaces/pthread_mutexattr_gettype/1-5.c | 2 +- .../pthread_mutexattr_gettype/speculative/3-1.c | 2 +- .../interfaces/pthread_mutexattr_init/1-1.c | 2 +- .../interfaces/pthread_mutexattr_init/3-1.c | 2 +- .../pthread_mutexattr_setprioceiling/1-1.c | 2 +- .../pthread_mutexattr_setprioceiling/3-1.c | 2 +- .../pthread_mutexattr_setprioceiling/3-2.c | 2 +- .../interfaces/pthread_mutexattr_setprotocol/1-1.c | 2 +- .../interfaces/pthread_mutexattr_setprotocol/3-1.c | 2 +- .../interfaces/pthread_mutexattr_setprotocol/3-2.c | 2 +- .../interfaces/pthread_mutexattr_setpshared/1-1.c | 2 +- .../interfaces/pthread_mutexattr_setpshared/1-2.c | 2 +- .../interfaces/pthread_mutexattr_setpshared/2-1.c | 2 +- .../interfaces/pthread_mutexattr_setpshared/2-2.c | 2 +- .../interfaces/pthread_mutexattr_setpshared/3-1.c | 2 +- .../interfaces/pthread_mutexattr_setpshared/3-2.c | 2 +- .../interfaces/pthread_mutexattr_settype/1-1.c | 2 +- .../interfaces/pthread_mutexattr_settype/2-1.c | 2 +- .../interfaces/pthread_mutexattr_settype/3-1.c | 2 +- .../interfaces/pthread_mutexattr_settype/3-2.c | 2 +- .../interfaces/pthread_mutexattr_settype/3-3.c | 2 +- .../interfaces/pthread_mutexattr_settype/3-4.c | 2 +- .../interfaces/pthread_mutexattr_settype/7-1.c | 2 +- .../conformance/interfaces/pthread_once/1-1.c | 2 +- .../conformance/interfaces/pthread_once/1-2.c | 2 +- .../conformance/interfaces/pthread_once/1-3.c | 2 +- .../conformance/interfaces/pthread_once/2-1.c | 2 +- .../conformance/interfaces/pthread_once/3-1.c | 2 +- .../conformance/interfaces/pthread_once/6-1.c | 2 +- .../interfaces/pthread_rwlock_destroy/1-1.c | 2 +- .../interfaces/pthread_rwlock_destroy/3-1.c | 2 +- .../interfaces/pthread_rwlock_init/1-1.c | 2 +- .../interfaces/pthread_rwlock_init/2-1.c | 2 +- .../interfaces/pthread_rwlock_init/3-1.c | 2 +- .../interfaces/pthread_rwlock_init/6-1.c | 2 +- .../interfaces/pthread_rwlock_rdlock/1-1.c | 2 +- .../interfaces/pthread_rwlock_rdlock/2-1.c | 2 +- .../interfaces/pthread_rwlock_rdlock/2-2.c | 2 +- .../interfaces/pthread_rwlock_rdlock/2-3.c | 2 +- .../interfaces/pthread_rwlock_rdlock/4-1.c | 2 +- .../interfaces/pthread_rwlock_rdlock/5-1.c | 2 +- .../interfaces/pthread_rwlock_timedrdlock/1-1.c | 2 +- .../interfaces/pthread_rwlock_timedrdlock/2-1.c | 2 +- .../interfaces/pthread_rwlock_timedrdlock/3-1.c | 2 +- .../interfaces/pthread_rwlock_timedrdlock/5-1.c | 2 +- .../interfaces/pthread_rwlock_timedrdlock/6-1.c | 2 +- .../interfaces/pthread_rwlock_timedrdlock/6-2.c | 2 +- .../interfaces/pthread_rwlock_timedwrlock/1-1.c | 2 +- .../interfaces/pthread_rwlock_timedwrlock/3-1.c | 2 +- .../interfaces/pthread_rwlock_timedwrlock/5-1.c | 2 +- .../interfaces/pthread_rwlock_timedwrlock/6-1.c | 2 +- .../interfaces/pthread_rwlock_timedwrlock/6-2.c | 2 +- .../interfaces/pthread_rwlock_tryrdlock/1-1.c | 2 +- .../interfaces/pthread_rwlock_trywrlock/1-1.c | 2 +- .../pthread_rwlock_trywrlock/speculative/3-1.c | 2 +- .../interfaces/pthread_rwlock_unlock/1-1.c | 2 +- .../interfaces/pthread_rwlock_unlock/2-1.c | 2 +- .../interfaces/pthread_rwlock_unlock/3-1.c | 2 +- .../interfaces/pthread_rwlock_unlock/4-1.c | 2 +- .../interfaces/pthread_rwlock_unlock/4-2.c | 2 +- .../interfaces/pthread_rwlock_wrlock/1-1.c | 2 +- .../interfaces/pthread_rwlock_wrlock/2-1.c | 2 +- .../interfaces/pthread_rwlock_wrlock/3-1.c | 2 +- .../interfaces/pthread_rwlockattr_destroy/1-1.c | 2 +- .../interfaces/pthread_rwlockattr_destroy/2-1.c | 2 +- .../interfaces/pthread_rwlockattr_getpshared/1-1.c | 2 +- .../interfaces/pthread_rwlockattr_getpshared/2-1.c | 2 +- .../interfaces/pthread_rwlockattr_getpshared/4-1.c | 2 +- .../interfaces/pthread_rwlockattr_init/1-1.c | 2 +- .../interfaces/pthread_rwlockattr_init/2-1.c | 2 +- .../interfaces/pthread_rwlockattr_setpshared/1-1.c | 2 +- .../conformance/interfaces/pthread_self/1-1.c | 2 +- .../interfaces/pthread_setcancelstate/1-1.c | 2 +- .../interfaces/pthread_setcancelstate/1-2.c | 2 +- .../interfaces/pthread_setcancelstate/2-1.c | 2 +- .../interfaces/pthread_setcancelstate/3-1.c | 2 +- .../interfaces/pthread_setcanceltype/1-1.c | 2 +- .../interfaces/pthread_setcanceltype/1-2.c | 2 +- .../interfaces/pthread_setcanceltype/2-1.c | 2 +- .../interfaces/pthread_setschedparam/1-1.c | 2 +- .../interfaces/pthread_setschedparam/1-2.c | 2 +- .../interfaces/pthread_setschedparam/4-1.c | 2 +- .../interfaces/pthread_setschedparam/5-1.c | 2 +- .../interfaces/pthread_setschedprio/1-1.c | 2 +- .../interfaces/pthread_setspecific/1-1.c | 2 +- .../interfaces/pthread_setspecific/1-2.c | 2 +- .../conformance/interfaces/pthread_sigmask/10-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/12-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/14-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/15-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/16-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/18-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/4-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/5-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/6-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/7-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/8-1.c | 2 +- .../conformance/interfaces/pthread_sigmask/8-2.c | 2 +- .../conformance/interfaces/pthread_sigmask/8-3.c | 2 +- .../conformance/interfaces/pthread_sigmask/9-1.c | 2 +- .../interfaces/pthread_spin_destroy/1-1.c | 2 +- .../interfaces/pthread_spin_destroy/3-1.c | 2 +- .../conformance/interfaces/pthread_spin_init/1-1.c | 2 +- .../conformance/interfaces/pthread_spin_init/2-1.c | 2 +- .../conformance/interfaces/pthread_spin_init/2-2.c | 2 +- .../conformance/interfaces/pthread_spin_init/4-1.c | 2 +- .../conformance/interfaces/pthread_spin_lock/1-1.c | 2 +- .../conformance/interfaces/pthread_spin_lock/1-2.c | 2 +- .../conformance/interfaces/pthread_spin_lock/3-1.c | 2 +- .../conformance/interfaces/pthread_spin_lock/3-2.c | 2 +- .../interfaces/pthread_spin_trylock/1-1.c | 2 +- .../interfaces/pthread_spin_trylock/4-1.c | 2 +- .../interfaces/pthread_spin_unlock/1-1.c | 2 +- .../interfaces/pthread_spin_unlock/1-2.c | 2 +- .../interfaces/pthread_spin_unlock/3-1.c | 2 +- .../interfaces/pthread_testcancel/1-1.c | 2 +- .../interfaces/pthread_testcancel/2-1.c | 2 +- .../conformance/interfaces/raise/1-1.c | 2 +- .../conformance/interfaces/raise/1-2.c | 2 +- .../conformance/interfaces/raise/10000-1.c | 2 +- .../conformance/interfaces/raise/2-1.c | 2 +- .../conformance/interfaces/raise/4-1.c | 2 +- .../conformance/interfaces/raise/6-1.c | 2 +- .../conformance/interfaces/raise/7-1.c | 2 +- .../interfaces/sched_get_priority_max/1-1.c | 2 +- .../interfaces/sched_get_priority_max/1-2.c | 2 +- .../interfaces/sched_get_priority_max/1-3.c | 4 ++-- .../interfaces/sched_get_priority_max/1-4.c | 2 +- .../interfaces/sched_get_priority_max/2-1.c | 2 +- .../interfaces/sched_get_priority_min/1-1.c | 2 +- .../interfaces/sched_get_priority_min/1-2.c | 2 +- .../interfaces/sched_get_priority_min/1-3.c | 4 ++-- .../interfaces/sched_get_priority_min/1-4.c | 2 +- .../interfaces/sched_get_priority_min/2-1.c | 2 +- .../conformance/interfaces/sched_getparam/1-1.c | 2 +- .../conformance/interfaces/sched_getparam/2-1.c | 2 +- .../conformance/interfaces/sched_getparam/3-1.c | 2 +- .../conformance/interfaces/sched_getparam/4-1.c | 2 +- .../conformance/interfaces/sched_getparam/6-1.c | 2 +- .../interfaces/sched_getparam/speculative/7-1.c | 2 +- .../interfaces/sched_getscheduler/1-1.c | 2 +- .../interfaces/sched_getscheduler/3-1.c | 2 +- .../interfaces/sched_getscheduler/4-1.c | 2 +- .../interfaces/sched_getscheduler/5-1.c | 2 +- .../interfaces/sched_getscheduler/7-1.c | 2 +- .../interfaces/sched_rr_get_interval/1-1.c | 2 +- .../interfaces/sched_rr_get_interval/2-1.c | 2 +- .../interfaces/sched_rr_get_interval/3-1.c | 2 +- .../sched_rr_get_interval/speculative/5-1.c | 2 +- .../conformance/interfaces/sched_setparam/1-1.c | 2 +- .../conformance/interfaces/sched_setparam/2-1.c | 2 +- .../conformance/interfaces/sched_setparam/2-2.c | 2 +- .../conformance/interfaces/sched_setparam/20-1.c | 2 +- .../conformance/interfaces/sched_setparam/21-1.c | 2 +- .../conformance/interfaces/sched_setparam/21-2.c | 2 +- .../conformance/interfaces/sched_setparam/22-1.c | 2 +- .../conformance/interfaces/sched_setparam/23-1.c | 2 +- .../conformance/interfaces/sched_setparam/23-2.c | 4 ++-- .../conformance/interfaces/sched_setparam/23-3.c | 4 ++-- .../conformance/interfaces/sched_setparam/23-4.c | 4 ++-- .../conformance/interfaces/sched_setparam/23-5.c | 4 ++-- .../conformance/interfaces/sched_setparam/23-6.c | 2 +- .../conformance/interfaces/sched_setparam/23-7.c | 2 +- .../conformance/interfaces/sched_setparam/25-1.c | 2 +- .../conformance/interfaces/sched_setparam/25-2.c | 2 +- .../conformance/interfaces/sched_setparam/25-3.c | 2 +- .../conformance/interfaces/sched_setparam/25-4.c | 2 +- .../conformance/interfaces/sched_setparam/26-1.c | 2 +- .../conformance/interfaces/sched_setparam/27-1.c | 2 +- .../conformance/interfaces/sched_setparam/5-1.c | 2 +- .../interfaces/sched_setscheduler/1-1.c | 2 +- .../interfaces/sched_setscheduler/15-1.c | 2 +- .../interfaces/sched_setscheduler/15-2.c | 2 +- .../interfaces/sched_setscheduler/16-1.c | 2 +- .../interfaces/sched_setscheduler/17-1.c | 2 +- .../interfaces/sched_setscheduler/17-2.c | 4 ++-- .../interfaces/sched_setscheduler/17-3.c | 4 ++-- .../interfaces/sched_setscheduler/17-4.c | 4 ++-- .../interfaces/sched_setscheduler/17-6.c | 2 +- .../interfaces/sched_setscheduler/17-7.c | 2 +- .../interfaces/sched_setscheduler/19-1.c | 2 +- .../interfaces/sched_setscheduler/19-2.c | 4 ++-- .../interfaces/sched_setscheduler/19-3.c | 4 ++-- .../interfaces/sched_setscheduler/19-4.c | 4 ++-- .../interfaces/sched_setscheduler/19-5.c | 2 +- .../interfaces/sched_setscheduler/20-1.c | 2 +- .../interfaces/sched_setscheduler/21-1.c | 2 +- .../interfaces/sched_setscheduler/22-1.c | 2 +- .../interfaces/sched_setscheduler/22-2.c | 2 +- .../interfaces/sched_setscheduler/4-1.c | 2 +- .../conformance/interfaces/sched_yield/2-1.c | 2 +- .../conformance/interfaces/sem_close/1-1.c | 2 +- .../conformance/interfaces/sem_close/2-1.c | 2 +- .../conformance/interfaces/sem_close/3-1.c | 2 +- .../conformance/interfaces/sem_close/3-2.c | 2 +- .../conformance/interfaces/sem_destroy/3-1.c | 2 +- .../conformance/interfaces/sem_destroy/4-1.c | 2 +- .../conformance/interfaces/sem_getvalue/2-2.c | 2 +- .../conformance/interfaces/sem_init/1-1.c | 2 +- .../conformance/interfaces/sem_init/2-1.c | 2 +- .../conformance/interfaces/sem_init/2-2.c | 2 +- .../conformance/interfaces/sem_init/3-1.c | 2 +- .../conformance/interfaces/sem_init/3-2.c | 2 +- .../conformance/interfaces/sem_init/3-3.c | 2 +- .../conformance/interfaces/sem_init/5-1.c | 2 +- .../conformance/interfaces/sem_init/5-2.c | 2 +- .../conformance/interfaces/sem_init/6-1.c | 2 +- .../conformance/interfaces/sem_init/7-1.c | 2 +- .../conformance/interfaces/sem_open/1-1.c | 2 +- .../conformance/interfaces/sem_open/1-2.c | 2 +- .../conformance/interfaces/sem_open/1-3.c | 2 +- .../conformance/interfaces/sem_open/1-4.c | 2 +- .../conformance/interfaces/sem_open/10-1.c | 2 +- .../conformance/interfaces/sem_open/15-1.c | 2 +- .../conformance/interfaces/sem_open/2-1.c | 2 +- .../conformance/interfaces/sem_open/2-2.c | 2 +- .../conformance/interfaces/sem_open/3-1.c | 2 +- .../conformance/interfaces/sem_open/4-1.c | 2 +- .../conformance/interfaces/sem_open/5-1.c | 2 +- .../conformance/interfaces/sem_open/6-1.c | 2 +- .../conformance/interfaces/sem_post/1-1.c | 2 +- .../conformance/interfaces/sem_post/1-2.c | 2 +- .../conformance/interfaces/sem_post/2-1.c | 2 +- .../conformance/interfaces/sem_post/4-1.c | 2 +- .../conformance/interfaces/sem_post/5-1.c | 2 +- .../conformance/interfaces/sem_post/6-1.c | 2 +- .../conformance/interfaces/sem_timedwait/1-1.c | 2 +- .../conformance/interfaces/sem_timedwait/10-1.c | 2 +- .../conformance/interfaces/sem_timedwait/11-1.c | 2 +- .../conformance/interfaces/sem_timedwait/2-1.c | 2 +- .../conformance/interfaces/sem_timedwait/2-2.c | 2 +- .../conformance/interfaces/sem_timedwait/3-1.c | 2 +- .../conformance/interfaces/sem_timedwait/4-1.c | 2 +- .../conformance/interfaces/sem_timedwait/6-1.c | 2 +- .../conformance/interfaces/sem_timedwait/6-2.c | 2 +- .../conformance/interfaces/sem_timedwait/7-1.c | 2 +- .../conformance/interfaces/sem_timedwait/9-1.c | 2 +- .../conformance/interfaces/sem_unlink/1-1.c | 2 +- .../conformance/interfaces/sem_unlink/2-1.c | 2 +- .../conformance/interfaces/sem_unlink/2-2.c | 2 +- .../conformance/interfaces/sem_unlink/3-1.c | 2 +- .../conformance/interfaces/sem_unlink/4-1.c | 2 +- .../conformance/interfaces/sem_unlink/4-2.c | 2 +- .../conformance/interfaces/sem_unlink/5-1.c | 2 +- .../conformance/interfaces/sem_unlink/6-1.c | 2 +- .../conformance/interfaces/sem_unlink/7-1.c | 2 +- .../conformance/interfaces/sem_unlink/9-1.c | 2 +- .../conformance/interfaces/sem_wait/1-1.c | 2 +- .../conformance/interfaces/sem_wait/1-2.c | 2 +- .../conformance/interfaces/sem_wait/11-1.c | 2 +- .../conformance/interfaces/sem_wait/12-1.c | 2 +- .../conformance/interfaces/sem_wait/13-1.c | 2 +- .../conformance/interfaces/sem_wait/3-1.c | 2 +- .../conformance/interfaces/sem_wait/5-1.c | 2 +- .../conformance/interfaces/sem_wait/7-1.c | 2 +- .../conformance/interfaces/shm_open/1-1.c | 2 +- .../conformance/interfaces/shm_open/11-1.c | 2 +- .../conformance/interfaces/shm_open/13-1.c | 2 +- .../conformance/interfaces/shm_open/14-2.c | 2 +- .../conformance/interfaces/shm_open/15-1.c | 2 +- .../conformance/interfaces/shm_open/16-1.c | 2 +- .../conformance/interfaces/shm_open/17-1.c | 2 +- .../conformance/interfaces/shm_open/18-1.c | 2 +- .../conformance/interfaces/shm_open/20-1.c | 2 +- .../conformance/interfaces/shm_open/20-2.c | 2 +- .../conformance/interfaces/shm_open/20-3.c | 2 +- .../conformance/interfaces/shm_open/21-1.c | 2 +- .../conformance/interfaces/shm_open/22-1.c | 2 +- .../conformance/interfaces/shm_open/23-1.c | 2 +- .../conformance/interfaces/shm_open/25-1.c | 2 +- .../conformance/interfaces/shm_open/26-1.c | 2 +- .../conformance/interfaces/shm_open/26-2.c | 2 +- .../conformance/interfaces/shm_open/28-1.c | 2 +- .../conformance/interfaces/shm_open/28-2.c | 2 +- .../conformance/interfaces/shm_open/28-3.c | 2 +- .../conformance/interfaces/shm_open/32-1.c | 2 +- .../conformance/interfaces/shm_open/34-1.c | 2 +- .../conformance/interfaces/shm_open/37-1.c | 2 +- .../conformance/interfaces/shm_open/38-1.c | 2 +- .../conformance/interfaces/shm_open/39-1.c | 2 +- .../conformance/interfaces/shm_open/39-2.c | 2 +- .../conformance/interfaces/shm_open/41-1.c | 2 +- .../conformance/interfaces/shm_open/5-1.c | 2 +- .../conformance/interfaces/shm_open/8-1.c | 2 +- .../conformance/interfaces/shm_unlink/1-1.c | 2 +- .../conformance/interfaces/shm_unlink/10-1.c | 2 +- .../conformance/interfaces/shm_unlink/10-2.c | 2 +- .../conformance/interfaces/shm_unlink/11-1.c | 2 +- .../conformance/interfaces/shm_unlink/2-1.c | 2 +- .../conformance/interfaces/shm_unlink/3-1.c | 2 +- .../conformance/interfaces/shm_unlink/5-1.c | 2 +- .../conformance/interfaces/shm_unlink/6-1.c | 2 +- .../conformance/interfaces/shm_unlink/8-1.c | 2 +- .../conformance/interfaces/shm_unlink/9-1.c | 2 +- .../conformance/interfaces/sigaction/1-1.c | 2 +- .../conformance/interfaces/sigaction/1-10.c | 2 +- .../conformance/interfaces/sigaction/1-11.c | 2 +- .../conformance/interfaces/sigaction/1-12.c | 2 +- .../conformance/interfaces/sigaction/1-13.c | 2 +- .../conformance/interfaces/sigaction/1-14.c | 2 +- .../conformance/interfaces/sigaction/1-15.c | 2 +- .../conformance/interfaces/sigaction/1-16.c | 2 +- .../conformance/interfaces/sigaction/1-17.c | 2 +- .../conformance/interfaces/sigaction/1-18.c | 2 +- .../conformance/interfaces/sigaction/1-19.c | 2 +- .../conformance/interfaces/sigaction/1-2.c | 2 +- .../conformance/interfaces/sigaction/1-20.c | 2 +- .../conformance/interfaces/sigaction/1-21.c | 2 +- .../conformance/interfaces/sigaction/1-22.c | 2 +- .../conformance/interfaces/sigaction/1-23.c | 2 +- .../conformance/interfaces/sigaction/1-24.c | 2 +- .../conformance/interfaces/sigaction/1-25.c | 2 +- .../conformance/interfaces/sigaction/1-26.c | 2 +- .../conformance/interfaces/sigaction/1-3.c | 2 +- .../conformance/interfaces/sigaction/1-4.c | 2 +- .../conformance/interfaces/sigaction/1-5.c | 2 +- .../conformance/interfaces/sigaction/1-6.c | 2 +- .../conformance/interfaces/sigaction/1-7.c | 2 +- .../conformance/interfaces/sigaction/1-8.c | 2 +- .../conformance/interfaces/sigaction/1-9.c | 2 +- .../conformance/interfaces/sigaction/11-1.c | 2 +- .../conformance/interfaces/sigaction/12-1.c | 2 +- .../conformance/interfaces/sigaction/12-10.c | 2 +- .../conformance/interfaces/sigaction/12-11.c | 2 +- .../conformance/interfaces/sigaction/12-12.c | 2 +- .../conformance/interfaces/sigaction/12-13.c | 2 +- .../conformance/interfaces/sigaction/12-14.c | 2 +- .../conformance/interfaces/sigaction/12-15.c | 2 +- .../conformance/interfaces/sigaction/12-16.c | 2 +- .../conformance/interfaces/sigaction/12-17.c | 2 +- .../conformance/interfaces/sigaction/12-18.c | 2 +- .../conformance/interfaces/sigaction/12-19.c | 2 +- .../conformance/interfaces/sigaction/12-2.c | 2 +- .../conformance/interfaces/sigaction/12-20.c | 2 +- .../conformance/interfaces/sigaction/12-21.c | 2 +- .../conformance/interfaces/sigaction/12-22.c | 2 +- .../conformance/interfaces/sigaction/12-23.c | 2 +- .../conformance/interfaces/sigaction/12-24.c | 2 +- .../conformance/interfaces/sigaction/12-25.c | 2 +- .../conformance/interfaces/sigaction/12-26.c | 2 +- .../conformance/interfaces/sigaction/12-27.c | 2 +- .../conformance/interfaces/sigaction/12-28.c | 2 +- .../conformance/interfaces/sigaction/12-29.c | 2 +- .../conformance/interfaces/sigaction/12-3.c | 2 +- .../conformance/interfaces/sigaction/12-30.c | 2 +- .../conformance/interfaces/sigaction/12-31.c | 2 +- .../conformance/interfaces/sigaction/12-32.c | 2 +- .../conformance/interfaces/sigaction/12-33.c | 2 +- .../conformance/interfaces/sigaction/12-34.c | 2 +- .../conformance/interfaces/sigaction/12-35.c | 2 +- .../conformance/interfaces/sigaction/12-36.c | 2 +- .../conformance/interfaces/sigaction/12-37.c | 2 +- .../conformance/interfaces/sigaction/12-38.c | 2 +- .../conformance/interfaces/sigaction/12-39.c | 2 +- .../conformance/interfaces/sigaction/12-4.c | 2 +- .../conformance/interfaces/sigaction/12-40.c | 2 +- .../conformance/interfaces/sigaction/12-41.c | 2 +- .../conformance/interfaces/sigaction/12-42.c | 2 +- .../conformance/interfaces/sigaction/12-43.c | 2 +- .../conformance/interfaces/sigaction/12-44.c | 2 +- .../conformance/interfaces/sigaction/12-45.c | 2 +- .../conformance/interfaces/sigaction/12-46.c | 2 +- .../conformance/interfaces/sigaction/12-47.c | 2 +- .../conformance/interfaces/sigaction/12-48.c | 2 +- .../conformance/interfaces/sigaction/12-49.c | 2 +- .../conformance/interfaces/sigaction/12-5.c | 2 +- .../conformance/interfaces/sigaction/12-50.c | 2 +- .../conformance/interfaces/sigaction/12-51.c | 2 +- .../conformance/interfaces/sigaction/12-52.c | 2 +- .../conformance/interfaces/sigaction/12-6.c | 2 +- .../conformance/interfaces/sigaction/12-7.c | 2 +- .../conformance/interfaces/sigaction/12-8.c | 2 +- .../conformance/interfaces/sigaction/12-9.c | 2 +- .../conformance/interfaces/sigaction/13-1.c | 2 +- .../conformance/interfaces/sigaction/13-10.c | 2 +- .../conformance/interfaces/sigaction/13-11.c | 2 +- .../conformance/interfaces/sigaction/13-12.c | 2 +- .../conformance/interfaces/sigaction/13-13.c | 2 +- .../conformance/interfaces/sigaction/13-14.c | 2 +- .../conformance/interfaces/sigaction/13-15.c | 2 +- .../conformance/interfaces/sigaction/13-16.c | 2 +- .../conformance/interfaces/sigaction/13-17.c | 2 +- .../conformance/interfaces/sigaction/13-18.c | 2 +- .../conformance/interfaces/sigaction/13-19.c | 2 +- .../conformance/interfaces/sigaction/13-2.c | 2 +- .../conformance/interfaces/sigaction/13-20.c | 2 +- .../conformance/interfaces/sigaction/13-21.c | 2 +- .../conformance/interfaces/sigaction/13-22.c | 2 +- .../conformance/interfaces/sigaction/13-23.c | 2 +- .../conformance/interfaces/sigaction/13-24.c | 2 +- .../conformance/interfaces/sigaction/13-25.c | 2 +- .../conformance/interfaces/sigaction/13-26.c | 2 +- .../conformance/interfaces/sigaction/13-3.c | 2 +- .../conformance/interfaces/sigaction/13-4.c | 2 +- .../conformance/interfaces/sigaction/13-5.c | 2 +- .../conformance/interfaces/sigaction/13-6.c | 2 +- .../conformance/interfaces/sigaction/13-7.c | 2 +- .../conformance/interfaces/sigaction/13-8.c | 2 +- .../conformance/interfaces/sigaction/13-9.c | 2 +- .../conformance/interfaces/sigaction/17-1.c | 2 +- .../conformance/interfaces/sigaction/17-10.c | 2 +- .../conformance/interfaces/sigaction/17-11.c | 2 +- .../conformance/interfaces/sigaction/17-12.c | 2 +- .../conformance/interfaces/sigaction/17-13.c | 2 +- .../conformance/interfaces/sigaction/17-14.c | 2 +- .../conformance/interfaces/sigaction/17-15.c | 2 +- .../conformance/interfaces/sigaction/17-16.c | 2 +- .../conformance/interfaces/sigaction/17-17.c | 2 +- .../conformance/interfaces/sigaction/17-18.c | 2 +- .../conformance/interfaces/sigaction/17-19.c | 2 +- .../conformance/interfaces/sigaction/17-2.c | 2 +- .../conformance/interfaces/sigaction/17-20.c | 2 +- .../conformance/interfaces/sigaction/17-21.c | 2 +- .../conformance/interfaces/sigaction/17-22.c | 2 +- .../conformance/interfaces/sigaction/17-23.c | 2 +- .../conformance/interfaces/sigaction/17-24.c | 2 +- .../conformance/interfaces/sigaction/17-25.c | 2 +- .../conformance/interfaces/sigaction/17-26.c | 2 +- .../conformance/interfaces/sigaction/17-3.c | 2 +- .../conformance/interfaces/sigaction/17-4.c | 2 +- .../conformance/interfaces/sigaction/17-5.c | 2 +- .../conformance/interfaces/sigaction/17-6.c | 2 +- .../conformance/interfaces/sigaction/17-7.c | 2 +- .../conformance/interfaces/sigaction/17-8.c | 2 +- .../conformance/interfaces/sigaction/17-9.c | 2 +- .../conformance/interfaces/sigaction/18-1.c | 2 +- .../conformance/interfaces/sigaction/18-10.c | 2 +- .../conformance/interfaces/sigaction/18-11.c | 2 +- .../conformance/interfaces/sigaction/18-12.c | 2 +- .../conformance/interfaces/sigaction/18-13.c | 2 +- .../conformance/interfaces/sigaction/18-14.c | 2 +- .../conformance/interfaces/sigaction/18-15.c | 2 +- .../conformance/interfaces/sigaction/18-16.c | 2 +- .../conformance/interfaces/sigaction/18-17.c | 2 +- .../conformance/interfaces/sigaction/18-18.c | 2 +- .../conformance/interfaces/sigaction/18-19.c | 2 +- .../conformance/interfaces/sigaction/18-2.c | 2 +- .../conformance/interfaces/sigaction/18-20.c | 2 +- .../conformance/interfaces/sigaction/18-21.c | 2 +- .../conformance/interfaces/sigaction/18-22.c | 2 +- .../conformance/interfaces/sigaction/18-23.c | 2 +- .../conformance/interfaces/sigaction/18-24.c | 2 +- .../conformance/interfaces/sigaction/18-25.c | 2 +- ...... [truncated message content] |
From: Cyril H. <su...@li...> - 2013-03-22 14:21:31
|
The branch, master, has been updated via 8567638ab4af6643389714479977545ba780b762 (commit) from f56e615d4b0b931a104c3daa0f4ed62a2c6a3e2c (commit) - Log ----------------------------------------------------------------- commit 8567638ab4af6643389714479977545ba780b762 Author: Jan Stancek <jst...@re...> Date: Fri Mar 22 11:41:41 2013 +0100 sched_stress: fix matrix inversion routine Fix code to not go out of bounds of "matrix_1" array and to do what it's supposed to - calculate inversion matrix. Signed-off-by: Jan Stancek <jst...@re...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/sched/sched_stress/sched_tc5.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/sched/sched_stress/sched_tc5.c b/testcases/kernel/sched/sched_stress/sched_tc5.c index d242c9e..db5ce96 100644 --- a/testcases/kernel/sched/sched_stress/sched_tc5.c +++ b/testcases/kernel/sched/sched_stress/sched_tc5.c @@ -210,7 +210,7 @@ void invert_matrix() * Form an identity matrix in the random matrix */ for (i = 0; i < MATRIX_SIZE; i++) { - t1 = matrix_1[i][j]; + t1 = matrix_1[i][i]; for (j = 0; j < MATRIX_SIZE; j++) { matrix_1[i][j] /= t1; matrix_2[i][j] /= t1; hooks/post-receive -- ltp |
From: Cyril H. <su...@li...> - 2013-03-22 03:21:55
|
The branch, master, has been updated via f56e615d4b0b931a104c3daa0f4ed62a2c6a3e2c (commit) from 575f9932699347440201d5ca6814cbe16cf35ac5 (commit) - Log ----------------------------------------------------------------- commit f56e615d4b0b931a104c3daa0f4ed62a2c6a3e2c Author: Jan Stancek <jst...@re...> Date: Thu Mar 21 16:08:26 2013 +0100 pan: fix potential overrun in tag_report char *cuts_info[5]; ... while (tok_num < 5 && (cuts_info[++tok_num] = strtok(NULL, "\t ")) != NULL) ; While above can run for tok_num == 4, in which case: cuts_info[++tok_num] becomes cuts_info[5] and that is outside of cuts_info array. Signed-off-by: Jan Stancek <jst...@re...> Signed-off-by: Wanlong Gao <gao...@cn...> ----------------------------------------------------------------------- Summary of changes: pan/tag_report.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pan/tag_report.c b/pan/tag_report.c index 473bed1..61caabd 100644 --- a/pan/tag_report.c +++ b/pan/tag_report.c @@ -425,7 +425,7 @@ SYM tags; int cuts_testcase(tag, keys) SYM tag, keys; { - char *cuts_info[5]; + char *cuts_info[6]; char key[KEYSIZE]; char *oldresult, *newresult, *worst_case(); int tok_num = 0; hooks/post-receive -- ltp |