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: Garrett C. <ris...@li...> - 2010-08-05 13:30:47
|
The branch, master, has been updated via 7c67a09a10268b5f9f503e0254f1f0f9f5ac2b69 (commit) via 1112402ad4e1630108343b90453491761c95628e (commit) from c649ab25dc3013b978b10279f4c8e2508a46baa7 (commit) - Log ----------------------------------------------------------------- commit 7c67a09a10268b5f9f503e0254f1f0f9f5ac2b69 Author: Garrett Cooper <yan...@gm...> Date: Thu Aug 5 06:28:15 2010 -0700 Make a note about `illegal' chars in pathnames. Suggested-by: Cyril Hrubis <ch...@su...> Signed-off-by: Garrett Cooper <yan...@gm...> commit 1112402ad4e1630108343b90453491761c95628e Author: Garrett Cooper <yan...@gm...> Date: Thu Aug 5 06:09:07 2010 -0700 Fix indentation; update maintainer to be Subrata. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: INSTALL | 18 ++++++++++++++++++ README | 13 ++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/INSTALL b/INSTALL index c97fc80..6207deb 100644 --- a/INSTALL +++ b/INSTALL @@ -65,6 +65,24 @@ what to do next... Compiling LTP ------------------- +"What's in a Path?" +------------------- + +Before getting started, you should make sure that your build directory and +source directory are as basic as possible: no commas, colons, semicolons, +spaces, etc. In fact, this is a relatively good rule of thumb when dealing +with any [Gnu?] make based opensource project. + +We won't `fix' the `issues' associated with these particular set of build +errors resulting from non-sane pathnames, because it would introduce unneeded +complexity into the build system and would require non-trivial effort to fix +and validate the third-party packages, and thus wouldn't be a sustainable +model to follow. + +So, we apologize for the inconvenience, but using other characters like +underscores and dashes should help when disambiguating words between build +and source pathnames. + In-build-tree ------------------- In-build-tree support is when you build binaries (applications, binary objects) diff --git a/README b/README index 1d62188..7f2dc6f 100644 --- a/README +++ b/README @@ -1,9 +1,8 @@ Linux Test Project -(Maintained by: Rishkesh K Rajak <ris...@li...>) +(Maintained by: Subrata Modak <su...@li...>) The latest image is always available at http://ltp.sf.net - About the Linux Test Project:: The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a @@ -28,18 +27,18 @@ CREDITS Credits to those who have contributed to the project. COPYING - GNU General Public License + GNU General Public License ChangeLog An incomplete list of changes to the project. We will try harder to keep this up to date. Makefile - Top level make file for LTP. + Top level make file for LTP. runalltests.sh A simple script to run all of the packaged tests in sequential order and - report the overall result. + report the overall result. diskio.sh A simple script to run all the diskio tests that pertain to the CD-ROM @@ -58,11 +57,11 @@ include/* lib/* The include and lib directories contain headers and codes for common routines used by many of the tests. We have tried to keep this to a - minimum. + minimum. testcases/* Contains all tests that run under the LTP as well as the "bin" - directory, which has hardlinks to all the test executables. + directory, which has hardlinks to all the test executables. runtest/* It houses command lists that are used by ltp-pan for automated testing. hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-05 08:38:18
|
The branch, master, has been updated via c649ab25dc3013b978b10279f4c8e2508a46baa7 (commit) from 0cdd169717c82b578ac27a15b2a5d44a62547558 (commit) - Log ----------------------------------------------------------------- commit c649ab25dc3013b978b10279f4c8e2508a46baa7 Author: Garrett Cooper <yan...@gm...> Date: Thu Aug 5 01:37:47 2010 -0700 More conformance definitions tests for mqueue.h. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../mqueue_h/{11-1.c => 11-1-buildonly.c} | 0 .../mqueue_h/{5-1.c => 5-1-buildonly.c} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename testcases/open_posix_testsuite/conformance/definitions/mqueue_h/{11-1.c => 11-1-buildonly.c} (100%) rename testcases/open_posix_testsuite/conformance/definitions/mqueue_h/{5-1.c => 5-1-buildonly.c} (100%) diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1-buildonly.c similarity index 100% rename from testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1.c rename to testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1-buildonly.c diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1-buildonly.c similarity index 100% rename from testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1.c rename to testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1-buildonly.c hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-05 08:30:10
|
The branch, master, has been updated via 0cdd169717c82b578ac27a15b2a5d44a62547558 (commit) via 8c50bcc8fd2d15288934179fb98a75ef28876668 (commit) from be5c78805d068a2ca1da9a9a4922dfc9ba734799 (commit) - Log ----------------------------------------------------------------- commit 0cdd169717c82b578ac27a15b2a5d44a62547558 Author: Garrett Cooper <yan...@gm...> Date: Thu Aug 5 01:29:21 2010 -0700 Add conformance definition tests for mqueue.h. Signed-off-by: Garrett Cooper <yan...@gm...> commit 8c50bcc8fd2d15288934179fb98a75ef28876668 Author: Garrett Cooper <yan...@gm...> Date: Mon Aug 2 23:39:51 2010 -0700 Add testcase to check contents of mq_attr. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../conformance/definitions/mqueue_h/1-1.c | 52 +++++++++++++++++--- .../definitions/mqueue_h/10-1-buildonly.c | 22 ++++++++ .../conformance/definitions/mqueue_h/10-1.c | 15 ------ .../conformance/definitions/mqueue_h/11-1.c | 2 +- .../definitions/mqueue_h/2-1-buildonly.c | 17 ++++++ .../conformance/definitions/mqueue_h/2-1.c | 15 ------ .../definitions/mqueue_h/3-1-buildonly.c | 17 ++++++ .../conformance/definitions/mqueue_h/3-1.c | 15 ------ .../definitions/mqueue_h/4-1-buildonly.c | 18 +++++++ .../conformance/definitions/mqueue_h/4-1.c | 14 ----- .../conformance/definitions/mqueue_h/5-1.c | 2 +- .../definitions/mqueue_h/6-1-buildonly.c | 20 ++++++++ .../conformance/definitions/mqueue_h/6-1.c | 15 ------ .../definitions/mqueue_h/7-1-buildonly.c | 20 ++++++++ .../conformance/definitions/mqueue_h/7-1.c | 15 ------ .../definitions/mqueue_h/8-1-buildonly.c | 19 +++++++ .../conformance/definitions/mqueue_h/8-1.c | 15 ------ .../definitions/mqueue_h/9-1-buildonly.c | 22 ++++++++ .../conformance/definitions/mqueue_h/9-1.c | 15 ------ .../conformance/definitions/mqueue_h/CFLAGS | 1 + .../timers => definitions/mqueue_h}/LDLIBS | 0 21 files changed, 202 insertions(+), 129 deletions(-) create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1-buildonly.c delete mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1.c create mode 100644 testcases/open_posix_testsuite/conformance/definitions/mqueue_h/CFLAGS copy testcases/open_posix_testsuite/conformance/{behavior/timers => definitions/mqueue_h}/LDLIBS (100%) diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/1-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/1-1.c index bdefbc4..5b29a9c 100644 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/1-1.c +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/1-1.c @@ -1,15 +1,51 @@ -/* - Test for the existance and valid format - of the mq_attr structure as specified on - line 9678 of the Base Definitions document -*/ +/* + * Garrett Cooper, August 2010 + * + * Verify that mq_flags, mq_maxmsg, mq_msgsize, and mq_curmsgs exist in the + * struct mq_attr structure and are long integers as per the + * IEEE Std 1003.1-2008 spec. + */ +#include <limits.h> #include <mqueue.h> -#include "posixtest.h" #include <stdio.h> +#include "posixtest.h" + +#define TEST_LIMITS(structure_and_field) do { \ + printf("%s..\n", # structure_and_field); \ + printf("\t.. -LONG_MIN\n"); \ + structure_and_field = -LONG_MIN; \ + if (structure_and_field != -LONG_MIN) { \ + return (PTS_FAIL); \ + } \ + printf("\t.. LONG_MAX\n"); \ + structure_and_field = LONG_MAX; \ + if (structure_and_field != LONG_MAX) { \ + return (PTS_FAIL); \ + } \ + printf("\t.. -(LONG_MIN+1)\n"); \ + structure_and_field = -(LONG_MIN+1); \ + if (structure_and_field != LONG_MAX) { \ + return (PTS_FAIL); \ + } \ + structure_and_field = LONG_MAX+1; \ + printf("\t.. (LONG_MAX+1)\n"); \ + if (structure_and_field != LONG_MIN) { \ + return (PTS_FAIL); \ + } \ + } while (0) int main() { - fprintf(stderr, "Not Implemented!\n"); - return PTS_UNTESTED; + struct mq_attr mqs; + + TEST_LIMITS(mqs.mq_flags); + TEST_LIMITS(mqs.mq_maxmsg); + TEST_LIMITS(mqs.mq_msgsize); + TEST_LIMITS(mqs.mq_curmsgs); + + printf("PASSED!\n"); + + return (PTS_PASS); + } diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1-buildonly.c new file mode 100644 index 0000000..d0d26ec --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1-buildonly.c @@ -0,0 +1,22 @@ +/* + Test for the existence and valid prototype + of the mq_timedsend function as specified on + line 9694 of the Base Definitions document +*/ + +#include <mqueue.h> +#include <time.h> +#include "posixtest.h" + +void test_mq_timedsend_prototype(void) +{ + mqd_t mqdes; + struct timespec timeout; + char *msgp; + int err; + size_t msg_len; + unsigned msg_prio; + + err = mq_timedsend(mqdes, msgp, msg_len, msg_prio, &timeout); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1.c deleted file mode 100644 index 76f2e82..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/10-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - Test for the existance and valid prototype - of the mq_timedsend function as specified on - line 9694 of the Base Definitions document -*/ - -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1.c index 8ee7d6e..961a140 100644 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1.c +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/11-1.c @@ -1,5 +1,5 @@ /* -Test for the existance and valid prototype +Test for the existence and valid prototype of the mq_unlink function as specified on line 9696 of the Base Definitions document */ diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1-buildonly.c new file mode 100644 index 0000000..2f72536 --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1-buildonly.c @@ -0,0 +1,17 @@ +/* + Test for the existence and valid prototype + of the mq_close function as specified on + line 9684 of the Base Definitions document +*/ + +#include <mqueue.h> +#include "posixtest.h" + +void test_mq_close_prototype(void) +{ + mqd_t mqdes; + int err; + + err = mq_close(mqdes); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1.c deleted file mode 100644 index d6614c1..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/2-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - Test for the existance and valid prototype - of the mq_close function as specified on - line 9684 of the Base Definitions document -*/ - -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1-buildonly.c new file mode 100644 index 0000000..f71e1b9 --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1-buildonly.c @@ -0,0 +1,17 @@ +/* + Test for the existence and valid prototype + of the mq_getattr function as specified on + line 9685 of the Base Definitions document +*/ + +#include <mqueue.h> +#include "posixtest.h" + +void test_mq_getattr_prototype(void) +{ + mqd_t mqdes; + struct mq_attr mqs; + int err; + + err = mq_getattr(mqdes, &mqs); +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1.c deleted file mode 100644 index 6cae3a0..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/3-1.c +++ /dev/null @@ -1,15 +0,0 @@ -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -/* - Test for the existance and valid prototype - of the mq_getattr function as specified on - line 9685 of the Base Definitions document -*/ - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1-buildonly.c new file mode 100644 index 0000000..e0906fa --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1-buildonly.c @@ -0,0 +1,18 @@ +/* + Test for the existence and valid prototype + of the mq_notify function as specified on + line 9686 of the Base Definitions document +*/ + +#include <mqueue.h> +#include "posixtest.h" + +void test_mq_notify_prototype(void) +{ + mqd_t mqdes; + struct sigevent *notification; + int err; + + err = mq_notify(mqdes, notification); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1.c deleted file mode 100644 index 44cca9b..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/4-1.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> -/* - Test for the existance and valid prototype - of the mq_notify function as specified on - line 9686 of the Base Definitions document -*/ - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1.c index 6da6f41..ce78ad0 100644 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1.c +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/5-1.c @@ -1,5 +1,5 @@ /* - Test for the existance and valid prototype + Test for the existence and valid prototype of the mq_open function as specified on line 9687 of the Base Definitions document */ diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1-buildonly.c new file mode 100644 index 0000000..4132b77 --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1-buildonly.c @@ -0,0 +1,20 @@ +/* + Test for the existence and valid prototype + of the mq_receive function as specified on + line 9688 of the Base Definitions document +*/ + +#include <mqueue.h> +#include "posixtest.h" + +void test_mq_receive_prototype(void) +{ + mqd_t mqdes; + ssize_t msg_size; + size_t msg_len; + char *msgp; + unsigned msg_prio; + + msg_size = mq_receive(mqdes, msgp, msg_len, &msg_prio); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1.c deleted file mode 100644 index 6a0c3d7..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/6-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - Test for the existance and valid prototype - of the mq_receive function as specified on - line 9688 of the Base Definitions document -*/ - -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1-buildonly.c new file mode 100644 index 0000000..216a26d --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1-buildonly.c @@ -0,0 +1,20 @@ +/* + Test for the existence and valid prototype + of the mq_send function as specified on + line 9689 of the Base Definitions document +*/ + +#include <mqueue.h> +#include "posixtest.h" + +void test_mq_send_prototype(void) +{ + mqd_t mqdes; + size_t msg_len; + char *msgp; + int err; + unsigned msg_prio; + + err = mq_receive(mqdes, msgp, msg_len, &msg_prio); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1.c deleted file mode 100644 index 19326d7..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/7-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - Test for the existance and valid prototype - of the mq_send function as specified on - line 9689 of the Base Definitions document -*/ - -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1-buildonly.c new file mode 100644 index 0000000..46773ef --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1-buildonly.c @@ -0,0 +1,19 @@ +/* + Test for the existence and valid prototype + of the mq_setattr function as specified on + line 9690 of the Base Definitions document +*/ + +#include <mqueue.h> +#include "posixtest.h" +#include <stdio.h> + +void test_mq_setattr_prototype(void) +{ + mqd_t mqdes; + struct mq_attr mqs, omqs; + int err; + + err = mq_setattr(mqdes, &mqs, &omqs); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1.c deleted file mode 100644 index 0bb87c4..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/8-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - Test for the existance and valid prototype - of the mq_setattr function as specified on - line 9690 of the Base Definitions document -*/ - -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1-buildonly.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1-buildonly.c new file mode 100644 index 0000000..38ec228 --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1-buildonly.c @@ -0,0 +1,22 @@ +/* + Test for the existence and valid prototype + of the mq_timedreceive function as specified on + line 9692 of the Base Definitions document +*/ + +#include <mqueue.h> +#include <time.h> +#include "posixtest.h" + +void test_mq_timedreceive_prototype(void) +{ + mqd_t mqdes; + struct timespec abstime; + size_t msg_len; + ssize_t size; + char *msgp; + unsigned msg_prio; + + size = mq_timedreceive(mqdes, msgp, msg_len, &msg_prio, &abstime); + +} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1.c b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1.c deleted file mode 100644 index 971817e..0000000 --- a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/9-1.c +++ /dev/null @@ -1,15 +0,0 @@ -/* - Test for the existance and valid prototype - of the mq_timedreceive function as specified on - line 9692 of the Base Definitions document -*/ - -#include <mqueue.h> -#include "posixtest.h" -#include <stdio.h> - -int main() -{ - fprintf(stderr, "Test not implemented!\n"); - return PTS_UNTESTED; -} diff --git a/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/CFLAGS b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/CFLAGS new file mode 100644 index 0000000..9afe27f --- /dev/null +++ b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/CFLAGS @@ -0,0 +1 @@ +`$(CC) -xc -c /dev/null -Wno-overflow 2>/dev/null && echo -Wno-overflow` diff --git a/testcases/open_posix_testsuite/conformance/behavior/timers/LDLIBS b/testcases/open_posix_testsuite/conformance/definitions/mqueue_h/LDLIBS similarity index 100% copy from testcases/open_posix_testsuite/conformance/behavior/timers/LDLIBS copy to testcases/open_posix_testsuite/conformance/definitions/mqueue_h/LDLIBS hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-03 05:04:33
|
The branch, master, has been updated via be5c78805d068a2ca1da9a9a4922dfc9ba734799 (commit) from 79196c65c9923518de346ab9e1c4c0ab8761ed8c (commit) - Log ----------------------------------------------------------------- commit be5c78805d068a2ca1da9a9a4922dfc9ba734799 Author: Garrett Cooper <yan...@gm...> Date: Mon Aug 2 22:01:02 2010 -0700 Allow swapon03 to pass when max_swapfiles unknown. This patch will allow swapon03 test case to pass even when max_swapfiles is not known. Create maximum possible number of swapfiles during setup, then verify that attempting to create one more swapfile will return EPERM. This is meant to change as little as possible of the existing code. Signed-off-by: Murlin Ray Wenzel <mw...@no...> Acked-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/swapon/swapon03.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c index 6d6fdd8..e697a1f 100644 --- a/testcases/kernel/syscalls/swapon/swapon03.c +++ b/testcases/kernel/syscalls/swapon/swapon03.c @@ -142,8 +142,7 @@ int main(int ac, char **av) /* Check return code */ if ((TEST_RETURN == -1) && (TEST_ERRNO == expected_errno)) { tst_resm(TPASS, "swapon(2) got expected failure;" - " Got errno - %d, probably your" - " MAX_SWAPFILES is 30", expected_errno); + " Got errno = %d," , expected_errno); } else if (TEST_RETURN < 0) { tst_resm(TFAIL, "swapon(2) failed to produce" " expected error: %d, got %d (%s)." @@ -174,7 +173,7 @@ int main(int ac, char **av) && (TEST_ERRNO == expected_errno)) { tst_resm(TPASS, "swapon(2) got expected failure;" - " Got errno - %d, probably your" + " Got errno = %d, probably your" " MAX_SWAPFILES is 32", expected_errno); } else { @@ -291,11 +290,16 @@ int setup_swap() /* turn on the swap file */ if ((res = syscall(__NR_swapon, filename, 0)) != 0) { - tst_brkm(TFAIL | TERRNO, cleanup, - "Failed swapon for file %s", filename); - /* must cleanup already swapon files */ - clean_swap(); - exit(1); + if (errno == EPERM) { + printf("Successfully created %d swapfiles\n", j); + break; + } else { + tst_brkm(TFAIL | TERRNO, cleanup, + "Failed swapon for file %s", filename); + /* must cleanup already swapon files */ + clean_swap(); + exit(1); + } } } tst_exit(); hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-03 05:02:30
|
The branch, master, has been updated via 79196c65c9923518de346ab9e1c4c0ab8761ed8c (commit) from 64d869e27a5895a4acdc8d76598cce864daacb5a (commit) - Log ----------------------------------------------------------------- commit 79196c65c9923518de346ab9e1c4c0ab8761ed8c Author: Garrett Cooper <yan...@gm...> Date: Mon Aug 2 21:53:09 2010 -0700 Add -lrt to LDLIBS file. The aio* and lio* functions are in the is REALTIME category, thus this is required (although optional on some implementations of Unix, like non-RHEL Linux for some whacky reason, and FreeBSD). Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../timers => interfaces/lio_listio}/LDLIBS | 0 1 files changed, 0 insertions(+), 0 deletions(-) copy testcases/open_posix_testsuite/conformance/{behavior/timers => interfaces/lio_listio}/LDLIBS (100%) diff --git a/testcases/open_posix_testsuite/conformance/behavior/timers/LDLIBS b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/LDLIBS similarity index 100% copy from testcases/open_posix_testsuite/conformance/behavior/timers/LDLIBS copy to testcases/open_posix_testsuite/conformance/interfaces/lio_listio/LDLIBS hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-02 06:41:54
|
The branch, master, has been updated via 64d869e27a5895a4acdc8d76598cce864daacb5a (commit) from d0908cb1914dab2ce385bf70e84bba3385e08a16 (commit) - Log ----------------------------------------------------------------- commit 64d869e27a5895a4acdc8d76598cce864daacb5a Author: Garrett Cooper <yan...@gm...> Date: Sun Aug 1 23:38:03 2010 -0700 Preemptively fix error w/ missing tcl proc (fail). Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/misc/tcore_patch_test_suites/tcore.exp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/misc/tcore_patch_test_suites/tcore.exp b/testcases/misc/tcore_patch_test_suites/tcore.exp index 1b68291..7f1dc9f 100644 --- a/testcases/misc/tcore_patch_test_suites/tcore.exp +++ b/testcases/misc/tcore_patch_test_suites/tcore.exp @@ -43,7 +43,7 @@ proc check_threads {} { set buf $expect_out(0,string) } timeout { - fail "timeout while run info threads" + puts stderr "timeout while run info threads" return 1 } } @@ -111,7 +111,7 @@ proc check_fpu {num} { set buf $expect_out(0,string) } timeout { - fail "fail to check the xmm value(timeout)" + puts stderr "fail to check the xmm value(timeout)" return 1 } } hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-02 06:32:33
|
The branch, master, has been updated via d0908cb1914dab2ce385bf70e84bba3385e08a16 (commit) from bc4f41abbf043bf9149d050994f90feafb96df76 (commit) - Log ----------------------------------------------------------------- commit d0908cb1914dab2ce385bf70e84bba3385e08a16 Author: Garrett Cooper <yan...@gm...> Date: Sun Aug 1 23:25:40 2010 -0700 Sorry for my late answer. I considered how to judge detecting whether or not CLONE_* is available. However, I hit only about errno judgment. Signed-off-by: Tomonori Mitani <mi...@ry...> Acked-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../kernel/containers/netns/check_netns_enabled.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/containers/netns/check_netns_enabled.c b/testcases/kernel/containers/netns/check_netns_enabled.c index f6add06..6df86ac 100644 --- a/testcases/kernel/containers/netns/check_netns_enabled.c +++ b/testcases/kernel/containers/netns/check_netns_enabled.c @@ -42,8 +42,12 @@ int main() { /* Checking if the kernel supports unshare with netns capabilities. */ - if (syscall(__NR_unshare, CLONE_NEWNET | CLONE_NEWNS) < 0) { - tst_resm (TFAIL | TERRNO, "unshare syscall smoke test failed"); + if (syscall(__NR_unshare, CLONE_NEWNET | CLONE_NEWNS) < 0) { + if (errno == EINVAL) { + tst_resm (TWARN | TERRNO, "unshare syscall not support CLONE_NEWNET or CLONE_NEWNS"); + } else { + tst_resm (TFAIL | TERRNO, "unshare syscall smoke test failed"); + } } tst_exit(); } hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-08-02 06:17:34
|
The branch, master, has been updated via bc4f41abbf043bf9149d050994f90feafb96df76 (commit) from 33df225de41edcc3213535f249548acc937647a2 (commit) - Log ----------------------------------------------------------------- commit bc4f41abbf043bf9149d050994f90feafb96df76 Author: Garrett Cooper <yan...@gm...> Date: Sun Aug 1 23:14:05 2010 -0700 Restore file unnecessarily deleted back in Nov. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../get_sched_values.c} | 47 +++++++++++-------- 1 files changed, 27 insertions(+), 20 deletions(-) copy testcases/kernel/{containers/sysvipc/check_ipcns_enabled.c => power_management/get_sched_values.c} (57%) diff --git a/testcases/kernel/containers/sysvipc/check_ipcns_enabled.c b/testcases/kernel/power_management/get_sched_values.c similarity index 57% copy from testcases/kernel/containers/sysvipc/check_ipcns_enabled.c copy to testcases/kernel/power_management/get_sched_values.c index 2eee342..830448b 100644 --- a/testcases/kernel/containers/sysvipc/check_ipcns_enabled.c +++ b/testcases/kernel/power_management/get_sched_values.c @@ -1,5 +1,5 @@ -/* -* Copyright (c) International Business Machines Corp., 2007 +/************************************************************************ +* Copyright (c) International Business Machines Corp., 2008 * 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 @@ -13,28 +13,35 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * -* Author: Rishikesh K Rajak <ris...@in...> ***************************************************************************/ -#include <sched.h> #include <stdio.h> -#include "../libclone/libclone.h" -#include "test.h" +#include <test.h> -int dummy(void *v) -{ - return 0; +int get_supp_sched_mc(void) { + if (tst_kvercmp(2,6,29) < 0 ) + return 1; + else + return 2; } -int main() -{ - int pid; - - if (tst_kvercmp(2,6,19) < 0) - return 1; - pid = ltp_clone_quick(CLONE_NEWIPC, dummy, NULL); - - if (pid == -1) - return 3; - return 0; +int get_supp_sched_smt(void) { + if (tst_kvercmp(2,6,29) < 0 ) + return 1; + else + return 2; } +int main(int argc, char **argv) +{ + char *param; + if (argc == 0) + return 1; + else + { + param = argv[1]; + if (strcmp(param, "sched_mc")==0) + return (get_supp_sched_mc()); + if (strcmp(param, "sched_smt")==0) + return (get_supp_sched_smt()); + } +} hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-29 17:26:01
|
The branch, master, has been updated via 33df225de41edcc3213535f249548acc937647a2 (commit) via 080548263c4e8b3667277fa9e9f21105f918fa2b (commit) via 421044cd4185804fff682131038bbe843acf5e27 (commit) from 8565cff52d4fadc45b7c2d5373289fe140e31f3d (commit) - Log ----------------------------------------------------------------- commit 33df225de41edcc3213535f249548acc937647a2 Merge: 080548263c4e8b3667277fa9e9f21105f918fa2b 8565cff52d4fadc45b7c2d5373289fe140e31f3d Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 29 10:23:32 2010 -0700 Merge branch 'master' of ssh://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev commit 080548263c4e8b3667277fa9e9f21105f918fa2b Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 29 10:22:54 2010 -0700 Reorder headers. Signed-off-by: Garrett Cooper <yan...@gm...> commit 421044cd4185804fff682131038bbe843acf5e27 Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 29 10:20:55 2010 -0700 Fix error reporting for test. posix_memalign(3) has similar semantics to pthread(3) family functions when reporting errors (=> 0 pass, != 0 => errno). Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/mmap/11-3.c | 4 +- .../interfaces/pthread_attr_setstacksize/1-1.c | 30 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) 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 6592394..21ce909 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-3.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/mmap/11-3.c @@ -50,7 +50,7 @@ int main() long total_size; void *pa = NULL; - void *addr = NULL; + void *addr; size_t len; int flag; int fd; @@ -73,7 +73,7 @@ int main() sa.sa_handler = sigbus_handler; sigaction(SIGBUS, &sa, NULL); - snprintf(tmpfname, sizeof(tmpfname), "pts_mmap_11_3_%d", + snprintf(tmpfname, sizeof(tmpfname), "/pts_mmap_11_3_%d", getpid()); /* Create shared object */ shm_unlink(tmpfname); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c index e41546a..d08fb3b 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_attr_setstacksize/1-1.c @@ -13,13 +13,13 @@ * 3. create a thread with the attr */ -#include <pthread.h> +#include <sys/param.h> +#include <errno.h> #include <limits.h> +#include <pthread.h> #include <stdio.h> #include <string.h> #include <stdlib.h> -#include <sys/param.h> -#include <errno.h> #include <unistd.h> #include "posixtest.h" @@ -52,44 +52,48 @@ int main() /* printf("stack_size = %lu\n", stack_size); */ - if (posix_memalign (&saddr, sysconf(_SC_PAGE_SIZE), - stack_size) != 0) + rc = posix_memalign (&saddr, sysconf(_SC_PAGE_SIZE), stack_size); + + if (rc != 0) { - perror (ERROR_PREFIX "out of memory while " - "allocating the stack memory"); + printf (ERROR_PREFIX "out of memory while " + "allocating the stack memory: %s", strerror(rc)); exit(PTS_UNRESOLVED); } rc = pthread_attr_setstacksize(&attr, stack_size); - if (rc != 0 ) { - perror(ERROR_PREFIX "pthread_attr_setstacksize"); + if (rc != 0) { + printf(ERROR_PREFIX "pthread_attr_setstacksize: %s", + strerror(rc)); exit(PTS_UNRESOLVED); } rc = pthread_attr_getstacksize(&attr, &ssize); if (rc != 0 ) { - perror(ERROR_PREFIX "pthread_attr_getstacksize"); + printf(ERROR_PREFIX "pthread_attr_getstacksize: %s", + strerror(rc)); exit(PTS_UNRESOLVED); } /* printf("stack_size = %lu\n", ssize); */ rc = pthread_create(&new_th, &attr, thread_func, NULL); if (rc !=0 ) { - perror(ERROR_PREFIX "failed to create a thread"); + printf(ERROR_PREFIX "failed to create a thread: %s", + strerror(rc)); exit(PTS_FAIL); } rc = pthread_join(new_th, NULL); if(rc != 0) { - perror(ERROR_PREFIX "pthread_join"); + printf(ERROR_PREFIX "pthread_join: %s", strerror(rc)); exit(PTS_UNRESOLVED); } rc = pthread_attr_destroy(&attr); if(rc != 0) { - perror(ERROR_PREFIX "pthread_attr_destroy"); + printf(ERROR_PREFIX "pthread_attr_destroy: %s", strerror(rc)); exit(PTS_UNRESOLVED); } hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-29 17:08:37
|
The branch, master, has been updated via 8565cff52d4fadc45b7c2d5373289fe140e31f3d (commit) via 233231cdfa9f697a4c586ab9bfdf0f85d1a503a5 (commit) via 6cf3402cd0aca6b275e5e20fa5dcd27e90663d93 (commit) via cef69efa6df7a2b0353f180f867ccb8e2d051af4 (commit) from 578b57380fa545ed4c6670022bc0c6bb7cd1d15b (commit) - Log ----------------------------------------------------------------- commit 8565cff52d4fadc45b7c2d5373289fe140e31f3d Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 29 10:06:10 2010 +0000 Don't assume that SHELL has a sane value. SHELL is set to the login shell for the user (should have verified that before), and on FreeBSD the default login shell is tcsh (bleh). So take tcsh out of the equation by hardcoding sh -- which is ash on Debian variants and bash on almost all other Linuxes -- to increase determinism. Signed-off-by: Garrett Cooper <yan...@gm...> commit 233231cdfa9f697a4c586ab9bfdf0f85d1a503a5 Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 29 00:50:09 2010 -0700 Fix compile warnings and remove ambiguous stimuli. The POSIX spec states that only tv_nsec needs to be checked to see if it's positive: [EINVAL] The rqtp argument specified a nanosecond value less than zero or greater than or equal to 1000 million. Remove the testcase until the spec is fixed. Signed-off-by: Garrett Cooper <yan...@gm...> commit 6cf3402cd0aca6b275e5e20fa5dcd27e90663d93 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 28 22:33:42 2010 -0700 Another non-superuser check. Signed-off-by: Garrett Cooper <yan...@gm...> commit cef69efa6df7a2b0353f180f867ccb8e2d051af4 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 28 22:29:13 2010 -0700 Fix inconsistency. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/open_posix_testsuite/bin/run-tests.sh | 2 +- .../conformance/interfaces/clock_settime/17-2.c | 5 +++++ .../conformance/interfaces/clock_settime/20-1.c | 2 +- .../conformance/interfaces/nanosleep/10000-1.c | 16 ++++++++-------- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/testcases/open_posix_testsuite/bin/run-tests.sh b/testcases/open_posix_testsuite/bin/run-tests.sh index f06f64f..0a12578 100755 --- a/testcases/open_posix_testsuite/bin/run-tests.sh +++ b/testcases/open_posix_testsuite/bin/run-tests.sh @@ -46,7 +46,7 @@ run_test() { complog=`basename $testname`.log.$$ - $SHELL -c "$SCRIPT_DIR/t0 $TIMEOUT_VAL ./$1" > $complog 2>&1 + sh -c "$SCRIPT_DIR/t0 $TIMEOUT_VAL ./$1" > $complog 2>&1 ret_code=$? diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c index 6cd108c..8c9a34d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-2.c @@ -45,6 +45,11 @@ int main(int argc, char *argv[]) tpset.tv_sec = TESTTIME; tpset.tv_nsec = 0; + if (geteuid() != 0) { + printf("Test must be run as superuser\n"); + return PTS_UNRESOLVED; + } + for (i = 0; i < NUMINVALIDTESTS; i++) { if (clock_settime(invalid_tests[i], &tpset) == -1) { if (EINVAL != errno) { diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c index 149fc3d..d8cb1df 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) tpset.tv_sec = TESTTIME; tpset.tv_nsec = 0; - if (getuid() != 0) { + if (geteuid() != 0) { printf("Test must be run as superuser\n"); return PTS_UNRESOLVED; } 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 e0b87d1..1442d9f 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/nanosleep/10000-1.c @@ -20,7 +20,7 @@ #include "posixtest.h" #define NUMVALID 6 -#define NUMINVALID 8 +#define NUMINVALID 7 #define OKSECERR 1 @@ -40,7 +40,6 @@ static int sleepinvalid[NUMINVALID][2] = { {-1, -1}, {0, -1}, {1, 1000000000}, {2, 1000000000}, {-2147483647, -2147483647}, {1, 2147483647}, - {-1073743192, 0}, {0, 1075002478} }; int main(int argc, char *argv[]) @@ -77,15 +76,16 @@ int main(int argc, char *argv[]) } if ((slepts-tssleepfor.tv_sec) > OKSECERR) { - printf("FAIL - slept %ds%dns >> %ds%dns\n", + printf("FAIL - slept %lds%ldns >> %lds%ldns\n", slepts, sleptns, - (int) tssleepfor.tv_sec, - (int) tssleepfor.tv_nsec); + tssleepfor.tv_sec, + tssleepfor.tv_nsec); + failure = 1; } else { - printf("PASS - slept %ds%dns ~= %ds%dns\n", + printf("PASS - slept %lds%ldns ~= %lds%ldns\n", slepts, sleptns, - (int) tssleepfor.tv_sec, - (int) tssleepfor.tv_nsec); + tssleepfor.tv_sec, + tssleepfor.tv_nsec); } } else { printf("nanosleep() did not return 0 on success\n"); hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-29 05:30:33
|
The branch, master, has been updated via 578b57380fa545ed4c6670022bc0c6bb7cd1d15b (commit) via 3c68417fdacfe8bba8e05d147eb2aa2b91c79e59 (commit) from a66ee2d19b689573e9f59d0f303b86f6c333f795 (commit) - Log ----------------------------------------------------------------- commit 578b57380fa545ed4c6670022bc0c6bb7cd1d15b Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 28 22:27:28 2010 -0700 Add another non-superuser check. Signed-off-by: Garrett Cooper <yan...@gm...> commit 3c68417fdacfe8bba8e05d147eb2aa2b91c79e59 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 28 22:17:04 2010 -0700 Fix EPERM fail if clock_settime not called as root Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../conformance/interfaces/clock_settime/17-1.c | 7 ++++++- .../conformance/interfaces/clock_settime/20-1.c | 7 ++++++- .../conformance/interfaces/clock_settime/4-1.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-1.c index 6181479..db05f31 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/17-1.c @@ -11,9 +11,10 @@ * The date chosen is Nov 12, 2002 ~11:13am (date when test was first * written). */ +#include <errno.h> #include <stdio.h> #include <time.h> -#include <errno.h> +#include <unistd.h> #include "posixtest.h" #define TESTTIME 1037128358 @@ -26,6 +27,10 @@ int main(int argc, char *argv[]) tpset.tv_sec = TESTTIME; tpset.tv_nsec = 0; + if (geteuid() != 0) { + printf("This test must be run as superuser\n"); + return PTS_UNRESOLVED; + } if (clock_settime(BOGUSCLOCKID, &tpset) == -1) { if (EINVAL == errno) { printf("Test PASSED\n"); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c index 278f4c3..149fc3d 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/20-1.c @@ -10,9 +10,10 @@ * * The date chosen is Nov 12, 2002 ~11:13am. */ +#include <errno.h> #include <stdio.h> #include <time.h> -#include <errno.h> +#include <unistd.h> #include "posixtest.h" #define TESTTIME 1037128358 @@ -24,6 +25,10 @@ int main(int argc, char *argv[]) tpset.tv_sec = TESTTIME; tpset.tv_nsec = 0; + if (getuid() != 0) { + printf("Test must be run as superuser\n"); + return PTS_UNRESOLVED; + } if (clock_settime(CLOCK_MONOTONIC, &tpset) == -1) { if (EINVAL == errno) { printf("Test PASSED\n"); diff --git a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c index b43c5be..a23eeba 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/clock_settime/4-1.c @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) int flags = 0; /* Check that we're root...can't call clock_settime with CLOCK_REALTIME otherwise */ - if(getuid() != 0) + if(geteuid() != 0) { printf("Run this test as ROOT, not as a Regular User\n"); return PTS_UNTESTED; hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-29 04:15:44
|
The branch, master, has been updated via a66ee2d19b689573e9f59d0f303b86f6c333f795 (commit) from 3393cd192002793080aba661054d54a8a06f25c2 (commit) - Log ----------------------------------------------------------------- commit a66ee2d19b689573e9f59d0f303b86f6c333f795 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 28 21:11:59 2010 -0700 Use awk equivalent to FreeBSD's sed -E. This method of text search and replace is POSIX compliant. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../scripts/generate-makefiles.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh index b6e7b56..01984c5 100755 --- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh +++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh @@ -79,7 +79,7 @@ generate_makefile() { # # Path variables. -top_srcdir?= `echo "$prereq_dir" | sed -E -e 's,[^/]+,\.\.,g'` +top_srcdir?= `echo "$prereq_dir" | awk '{ gsub(/[^\/]+/, "..", $0); print }'` subdir= $prereq_cache_dir srcdir= \$(top_srcdir)/\$(subdir) hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-27 14:54:29
|
The branch, master, has been updated via 3393cd192002793080aba661054d54a8a06f25c2 (commit) from a4e64cb8bb97d09b5695151106946a76984b330a (commit) - Log ----------------------------------------------------------------- commit 3393cd192002793080aba661054d54a8a06f25c2 Author: Garrett Cooper <yan...@gm...> Date: Tue Jul 27 07:50:17 2010 -0700 Disable the open_posix_testsuite in the build. See the comment in the Makefile for more details. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/Makefile | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/testcases/Makefile b/testcases/Makefile index 2ed3f9c..37c448f 100644 --- a/testcases/Makefile +++ b/testcases/Makefile @@ -40,15 +40,21 @@ ifneq ($(UCLINUX),1) FILTER_OUT_DIRS += audit-test DOTS realtime endif +# +# XXX (garrcoop): disabling the open_posix_testsuite by request from Subrata +# due to build times (open_posix_testsuite runs serially by design to +# deterministically catch build errors -- see +# testcases/open_posix_testsuite/Makefile for more details). +# +#trunk-all: open_posix_testsuite-all +# +#trunk-clean:: open_posix_testsuite-clean +# +#trunk-install: open_posix_testsuite-install + open_posix_testsuite: mkdir -p $@ -trunk-all: open_posix_testsuite-all - -trunk-clean:: open_posix_testsuite-clean - -#trunk-install: open_posix_testsuite-install - open_posix_testsuite-%: open_posix_testsuite $(MAKE) -C $^ top_srcdir=$(abs_top_srcdir)/testcases/$^ $* hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-26 13:41:59
|
The branch, master, has been updated via a4e64cb8bb97d09b5695151106946a76984b330a (commit) from 47174970d9e880b358c7acf94f638b47d595037e (commit) - Log ----------------------------------------------------------------- commit a4e64cb8bb97d09b5695151106946a76984b330a Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 26 06:36:58 2010 -0700 Fix the 1-1 testcase. As pointed out by Cheng Shun Xia <cs...@no...> the pthread_mutex_getprioceiling() works only on mutexes initalized with PTHREAD_PRIO_PROTECT. Also calling perror() after pthread_* fuctions is meaningless as they return error number directly, this is common mistake in pthread tests in openposix testsuite and should go to the ltp TODO. Patch attached. Garrett note: this diff is based off the pthread_mutex_getprioceilingIII.patch, but edited for clarity in the comments, and doesn't print to stderr because it would cause issues with the open_posix_testsuite test infrastructure. Signed-off-by: Cyril Hrubis <ch...@su...> Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../pthread_mutexattr_getprioceiling/1-1.c | 43 +++++++++++++------- 1 files changed, 28 insertions(+), 15 deletions(-) diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c index 184b26c..4c8e8e2 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutexattr_getprioceiling/1-1.c @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2002, Intel Corporation. All rights reserved. * Created by: bing.wei.liu REMOVE-THIS AT intel DOT com * This file is licensed under the GPL license. For the full content @@ -10,7 +10,7 @@ * Gets the priority ceiling attribute of a mutexattr object (which was prev. created * by the function pthread_mutexattr_init()). * - * Steps:i + * Steps: * 1. Initialize a pthread_mutexattr_t object with pthread_mutexattr_init() * 2. Call pthread_mutexattr_getprioceiling() to obtain the prioceiling. * @@ -19,8 +19,15 @@ #include <pthread.h> #include <stdio.h> #include <sched.h> +#include <string.h> #include "posixtest.h" +static void +print_pthread_error(const char *fname, int ret) +{ + printf("Unexpected error at %s(): %s\n", fname, strerror(ret)); +} + int main() { @@ -30,31 +37,37 @@ int main() return PTS_UNRESOLVED; #endif */ - pthread_mutexattr_t mta; - int prioceiling, max_prio, min_prio; - + pthread_mutexattr_t ma; + int prioceiling, max_prio, min_prio, ret; + /* Initialize a mutex attributes object */ - if(pthread_mutexattr_init(&mta) != 0) - { - perror("Error at pthread_mutexattr_init()\n"); + ret = pthread_mutexattr_init(&ma); + if (ret != 0) { + print_pthread_error("pthread_mutexattr_init", ret); return PTS_UNRESOLVED; } - + + ret = pthread_mutexattr_setprotocol(&ma, PTHREAD_PRIO_PROTECT); + if (ret != 0) { + print_pthread_error("pthread_mutexattr_protocol", ret); + return PTS_UNRESOLVED; + } + /* Get the prioceiling mutex attr. */ - if(pthread_mutexattr_getprioceiling(&mta, &prioceiling) != 0) - { - fprintf(stderr,"Error obtaining the attribute process-shared\n"); + ret = pthread_mutexattr_getprioceiling(&ma, &prioceiling); + if (ret != 0) { + print_pthread_error("pthread_mutexattr_getprioceiling", ret); return PTS_UNRESOLVED; } - /* Get the max and min prio according to SCHED_FIFO (posix scheduling policy) */ + /* Get the max and min according to SCHED_FIFO */ max_prio = sched_get_priority_max(SCHED_FIFO); min_prio = sched_get_priority_min(SCHED_FIFO); - /* Make sure that prioceiling is withing the legal SCHED_FIFO boundries. */ + /* Ensure that prioceiling is within legal limits. */ if((prioceiling < min_prio) || (prioceiling > max_prio)) { - printf("Test FAILED: Default prioceiling %d is not compliant with SCHED_FIFO boundry. \n", prioceiling); + printf("Test FAILED: Default prioceiling %d is not compliant with SCHED_FIFO boundary.\n", prioceiling); return PTS_FAIL; } hooks/post-receive -- ltp |
From: Subrata <ris...@li...> - 2010-07-23 12:48:49
|
The branch, master, has been updated via 47174970d9e880b358c7acf94f638b47d595037e (commit) from 0056e395170eb8fc3ffbb22d7bd364fe47c2013e (commit) - Log ----------------------------------------------------------------- commit 47174970d9e880b358c7acf94f638b47d595037e Author: Subrata Modak <sub...@su...> Date: Fri Jul 23 18:16:32 2010 +0530 clock_getres01: remove TERRNO flag for overall test result: The attached patch remove the TERRNO flag for the overall clock_getres01 test status. It is wrong because, if one of the test fails, the reported errno will always be the one from the last case05 test (even 0 if this one was successful). Upon failure, the output will be: [...] clock_getres01 0 TINFO : (case05) START EXPECT: return value(ret)=(N >= 0) errno=0 (Success) RESULT: return value(ret)= 0 errno=0 (Success) clock_getres01 6 TPASS : (case05) END clock_getres01 7 TFAIL : clock_getres01 failed But previously: [...] clock_getres01 0 TINFO : (case05) START EXPECT: return value(ret)=(N >= 0) errno=0 (Success) RESULT: return value(ret)= 0 errno=0 (Success) clock_getres01 6 TPASS : (case05) END clock_getres01 7 TFAIL : clock_getres01 failed: errno=???(0): Success Signed-off-by: Nicolas Joly <nj...@pa...>. ----------------------------------------------------------------------- Summary of changes: .../kernel/syscalls/clock_getres/clock_getres01.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/syscalls/clock_getres/clock_getres01.c b/testcases/kernel/syscalls/clock_getres/clock_getres01.c index 412ffa5..7df8c71 100644 --- a/testcases/kernel/syscalls/clock_getres/clock_getres01.c +++ b/testcases/kernel/syscalls/clock_getres/clock_getres01.c @@ -327,7 +327,7 @@ int main(int ac, char **av) { break; default: - tst_resm(TFAIL | TERRNO, "%s failed", TCID); + tst_resm(TFAIL, "%s failed", TCID); RPRINTF("NG\n"); cleanup(); tst_exit(); hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-22 15:48:36
|
The branch, master, has been updated via 0056e395170eb8fc3ffbb22d7bd364fe47c2013e (commit) from 4fffe0e96c125c1ae1556b29341d689314c34f9c (commit) - Log ----------------------------------------------------------------- commit 0056e395170eb8fc3ffbb22d7bd364fe47c2013e Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 22 08:45:53 2010 -0700 Fix stack alignment on ARM with clone tests. An ARM stack must be a multiple of 32 bit words in length, and 32 bit aligned. Signed-off-by: Peter Pearse <pet...@li...> Acked-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: lib/cloner.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/cloner.c b/lib/cloner.c index 93cdc43..6ad4a00 100644 --- a/lib/cloner.c +++ b/lib/cloner.c @@ -59,6 +59,13 @@ ltp_clone(unsigned long clone_flags, int (*fn)(void *arg), void *arg, ret = clone(fn, stack, clone_flags, arg); #elif defined(__ia64__) ret = clone2(fn, stack, stack_size, clone_flags, arg, NULL, NULL, NULL); +#elif defined(__arm__) + /* + * Stack size should be a multiple of 32 bit words + * & stack limit must be aligned to a 32 bit boundary + */ + ret = clone(fn, (stack ? stack + stack_size : NULL), + clone_flags, arg); #else ret = clone(fn, (stack ? stack + stack_size - 1 : NULL), clone_flags, arg); hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-22 08:55:32
|
The branch, master, has been updated via 4fffe0e96c125c1ae1556b29341d689314c34f9c (commit) from ba7ee422383585d36c7b1c639ab2d24ad25d5a24 (commit) - Log ----------------------------------------------------------------- commit 4fffe0e96c125c1ae1556b29341d689314c34f9c Author: Garrett Cooper <yan...@gm...> Date: Thu Jul 22 01:52:03 2010 -0700 Commit the 20% check. Proposed by Casper Zhang <cz...@re...>. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/pselect/pselect01.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/testcases/kernel/syscalls/pselect/pselect01.c b/testcases/kernel/syscalls/pselect/pselect01.c index a8b370d..dbcbc53 100644 --- a/testcases/kernel/syscalls/pselect/pselect01.c +++ b/testcases/kernel/syscalls/pselect/pselect01.c @@ -66,7 +66,8 @@ int main() int retval; struct timespec tv, tv_start, tv_end; long real_nsec, total_nsec; - int real_sec, total_sec; + double real_sec; + int total_sec; setup(); @@ -107,14 +108,14 @@ int main() NULL); clock_gettime(CLOCK_REALTIME, &tv_end); - /* do a rounding */ - real_sec = (int)(0.5 + (tv_end.tv_sec - tv_start.tv_sec + - 1e-9 * (tv_end.tv_nsec - tv_start.tv_nsec))); - if (real_sec == total_sec) - tst_resm(TPASS, "Sleep time was correct"); + real_sec = (0.5 + (tv_end.tv_sec - tv_start.tv_sec + + 1e-9 * (tv_end.tv_nsec - tv_start.tv_nsec))); + if (abs(real_sec - total_sec) < 0.2 * total_sec) + tst_resm(TPASS, "Sleep time was correct " + "(%lf/%d < 20 %%)", real_sec, total_sec); else - tst_resm(TFAIL, "Sleep time was incorrect:%d != %d", - total_sec, real_sec); + tst_resm(TFAIL, "Sleep time was incorrect (%lf/%lf " + ">= 20%%)", total_sec, real_sec); } #ifdef DEBUG hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-21 09:54:26
|
The branch, master, has been updated via ba7ee422383585d36c7b1c639ab2d24ad25d5a24 (commit) from 956d771108e3b316853a5683fa965c0248b4a77c (commit) - Log ----------------------------------------------------------------- commit ba7ee422383585d36c7b1c639ab2d24ad25d5a24 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 21 02:49:39 2010 -0700 A 10% threshold was too low. Bump up to 20%: Hi Garrett, I tested my patch yesterday but the result is not so good. After 1000 times running, the fix got failed for once. so I set the allowed error to 20% (see the attached patch). Then re-ran it for over 5000 times, without a failure. Then the nsec part, 10% allowed error seems not enough, the test failed for twice among 1000 times. So I set the range to 20%, too. Signed-off-by/Tested-by: Caspar Zhang <cz...@re...> Acked-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/pselect/pselect01.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/pselect/pselect01.c b/testcases/kernel/syscalls/pselect/pselect01.c index 751f21d..a8b370d 100644 --- a/testcases/kernel/syscalls/pselect/pselect01.c +++ b/testcases/kernel/syscalls/pselect/pselect01.c @@ -141,8 +141,8 @@ int main() real_nsec = (tv_end.tv_sec - tv_start.tv_sec) * 1e9 + tv_end.tv_nsec - tv_start.tv_nsec; - /* allow 10% error*/ - if (abs(real_nsec - tv.tv_nsec) < 0.1 * total_nsec) + /* allow 20% error*/ + if (abs(real_nsec - tv.tv_nsec) < 0.2 * total_nsec) tst_resm(TPASS, "Sleep time was correct"); else { tst_resm(TWARN, hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-21 09:30:11
|
The branch, master, has been updated via 956d771108e3b316853a5683fa965c0248b4a77c (commit) from 5337e87014f42586915d091097ec1eacbd1f4e81 (commit) - Log ----------------------------------------------------------------- commit 956d771108e3b316853a5683fa965c0248b4a77c Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 21 02:23:47 2010 -0700 Use better precision accounting for pselect01. In my recent tests, not all desired time is equal to exact execution time, sometimes it is +/-1s, and in a few times it becomes +/-2s. In most cases, +/-2s is still a valid value between exact execute time and desired time. (the original patch proposed using time(3), but due to loss in precision as time(3) specifies in quantum of seconds, clock_gettime(3) was recommended and subsequently implemented). Signed-off-by: Caspar Zhang <cz...@re...> Acked-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/pselect/Makefile | 2 + testcases/kernel/syscalls/pselect/pselect01.c | 37 +++++++++++++------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/testcases/kernel/syscalls/pselect/Makefile b/testcases/kernel/syscalls/pselect/Makefile index c006930..2ad4c39 100644 --- a/testcases/kernel/syscalls/pselect/Makefile +++ b/testcases/kernel/syscalls/pselect/Makefile @@ -21,6 +21,8 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(abs_srcdir)/../utils/newer_64.mk +LDLIBS += -lpthread -lrt + %_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/kernel/syscalls/pselect/pselect01.c b/testcases/kernel/syscalls/pselect/pselect01.c index 250ed03..751f21d 100644 --- a/testcases/kernel/syscalls/pselect/pselect01.c +++ b/testcases/kernel/syscalls/pselect/pselect01.c @@ -61,14 +61,12 @@ extern int Tst_count; /* Test Case counter for tst_* routines */ int main() { - int ret_pselect, total_sec, fd, total_nsec; + int ret_pselect, fd; fd_set readfds; - struct timespec tv; int retval; - time_t t; - unsigned start, end; - struct timeval tv_start, tv_end; - int real_usec; + struct timespec tv, tv_start, tv_end; + long real_nsec, total_nsec; + int real_sec, total_sec; setup(); @@ -103,17 +101,20 @@ int main() tst_resm(TINFO, "Testing basic pselect sanity,Sleeping for %jd secs", (intmax_t)tv.tv_sec); - start = time(&t); + clock_gettime(CLOCK_REALTIME, &tv_start); retval = - pselect(0, &readfds, NULL, NULL, (struct timespec *)&tv, + pselect(0, &readfds, NULL, NULL, &tv, NULL); - end = time(&t); + clock_gettime(CLOCK_REALTIME, &tv_end); - if (((end - start) == total_sec) || ((end - start) == total_sec + 1)) + /* do a rounding */ + real_sec = (int)(0.5 + (tv_end.tv_sec - tv_start.tv_sec + + 1e-9 * (tv_end.tv_nsec - tv_start.tv_nsec))); + if (real_sec == total_sec) tst_resm(TPASS, "Sleep time was correct"); else tst_resm(TFAIL, "Sleep time was incorrect:%d != %d", - total_sec, (end - start)); + total_sec, real_sec); } #ifdef DEBUG @@ -129,19 +130,19 @@ int main() tst_resm(TINFO, "Testing basic pselect sanity,Sleeping for %ld nano secs", tv.tv_nsec); - gettimeofday(&tv_start, NULL); + clock_gettime(CLOCK_REALTIME, &tv_start); retval = pselect(0, &readfds, NULL, NULL, &tv, NULL); - gettimeofday(&tv_end, NULL); + clock_gettime(CLOCK_REALTIME, &tv_end); /* Changed total_sec compare to an at least vs an exact compare */ - real_usec = (tv_end.tv_sec - tv_start.tv_sec) * 1e6 + - tv_end.tv_usec - tv_start.tv_usec; + real_nsec = (tv_end.tv_sec - tv_start.tv_sec) * 1e9 + + tv_end.tv_nsec - tv_start.tv_nsec; /* allow 10% error*/ - if (abs(real_usec - tv.tv_nsec / 1000) < 0.1 * total_nsec / 1000) + if (abs(real_nsec - tv.tv_nsec) < 0.1 * total_nsec) tst_resm(TPASS, "Sleep time was correct"); else { tst_resm(TWARN, @@ -150,8 +151,8 @@ int main() "due to the limitation of the way it calculates the"); tst_resm(TWARN, "system call execution time."); tst_resm(TFAIL, - "Sleep time was incorrect:%d usec vs expected %d usec", - real_usec, total_nsec / 1000); + "Sleep time was incorrect:%ld nsec vs expected %ld nsec", + real_nsec, total_nsec); } } cleanup(); hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-21 09:21:56
|
The branch, master, has been updated via 5337e87014f42586915d091097ec1eacbd1f4e81 (commit) via 2ebc103b1b64660907f690d6e7c84dcc73b94f86 (commit) via e0a89f94e51eaed1c3ac9840130f166f3f232b4a (commit) via dc9a6950b7ad6324dac774bc7717dfd1a52995fe (commit) from a2739948cbdcb4a8981f3e75fe67f1921a075058 (commit) - Log ----------------------------------------------------------------- commit 5337e87014f42586915d091097ec1eacbd1f4e81 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 21 02:18:38 2010 -0700 Fix source path for install. Test case "mc_opts" fails as it is not able to install "opts" and "opts_e" files at desired location. This is because the path of these files mentioned in the "mc_opts" script is incorrect. Following patch fixes the above problem. Signed-off-by: Sumit Dhoot <su...@li...> Acked-by: Garrett Cooper <yan...@gm...> commit 2ebc103b1b64660907f690d6e7c84dcc73b94f86 Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 21 02:17:17 2010 -0700 Update location for multicast tests. While running networktest for multicast ; "mc_member" test displays the following error message multiple times "cat: /opt/ltp/testcases/inetwork/multicast/mc_menmber/ManyGroups: No such file or directory". This is Because variable "TCsrc" is exported with incorrect path. Looks like previously LTP test scripts installed and ran directly from source directory . Now it installs mulicast test binary and script files to "$LTPROOT/testcases/bin" directory. Hence the variable "TCsrc" needed to be exported with above mentioned install path. Signed-off-by: Sumit Dhoot <su...@li...> Acked-by: Garrett Cooper <yan...@gm...> commit e0a89f94e51eaed1c3ac9840130f166f3f232b4a Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 21 02:15:21 2010 -0700 Address issue with permissions on utimesat_tests. After investigation, I found that the following two parts maybe have wrong RW parameter: a) Testing read-only file, owned by nobody(self). Since the perm is 400, the user `nobody' itself doesn't have write permission to the testfile, thus, if program executes ./utimensat01 with -w param, `Permission deined' error will occur. So we need to add -W in run_test param to avoid trying writing test. b) Testing read-only file, owned by root. Since root owns the test file and the perm is still 400, the user `nobody' has neither writing nor reading permission to this file, so -RW param should be both set to run_test function to avoid trying reading & writing test. Signed-off-by: Caspar Zhang <cz...@re...> Acked-by: Garrett Cooper <yan...@gm...> commit dc9a6950b7ad6324dac774bc7717dfd1a52995fe Author: Garrett Cooper <yan...@gm...> Date: Wed Jul 21 02:12:15 2010 -0700 Fix test when dealing w/ new versions of file. This is a POSIX-friendly patch which uses grep -E instead of egrep. Suggested-by: Caspar Zhang <cz...@re...> Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: runtest/multicast | 6 ++-- testcases/commands/ade/file/file_test.sh | 2 +- .../kernel/syscalls/utimensat/utimensat_tests.sh | 24 ++++++++++---------- testcases/network/multicast/mc_opts/mc_opts | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/runtest/multicast b/runtest/multicast index 14e7828..08b65f7 100644 --- a/runtest/multicast +++ b/runtest/multicast @@ -3,6 +3,6 @@ # PLEASE READ THE README FILE IN /multicast BEFORE RUNNING THESE. # mc_cmds mc_cmds -mc_commo export TCsrc=$LTPROOT/testcases/network/multicast/mc_commo; mc_commo -mc_member export TCsrc=$LTPROOT/testcases/network/multicast/mc_member; mc_member -mc_opts export TCsrc=$LTPROOT/testcases/network/multicast/mc_opts; mc_opts +mc_commo export TCsrc=$LTPROOT/testcases/bin; mc_commo +mc_member export TCsrc=$LTPROOT/testcases/bin; mc_member +mc_opts export TCsrc=$LTPROOT/testcases/bin; mc_opts diff --git a/testcases/commands/ade/file/file_test.sh b/testcases/commands/ade/file/file_test.sh index 9232c10..70420e3 100755 --- a/testcases/commands/ade/file/file_test.sh +++ b/testcases/commands/ade/file/file_test.sh @@ -556,7 +556,7 @@ file $bDIR/SRPMS/cprog-0.0.7-3.src.rpm > $LTPTMP/file.out 2>&1 if [ $? -eq 0 ] then - grep "RPM v3 src" $LTPTMP/file.out > /dev/null 2>&1 + grep -E "RPM v3(\.0)? src" $LTPTMP/file.out > /dev/null 2>&1 if [ $? -eq 0 ] then $LTPBIN/tst_resm TPASS "file: Recognised RPM file correctly" diff --git a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh index 4246d1a..a861d61 100644 --- a/testcases/kernel/syscalls/utimensat/utimensat_tests.sh +++ b/testcases/kernel/syscalls/utimensat/utimensat_tests.sh @@ -288,22 +288,22 @@ echo "Testing read-only file, owned by self" echo echo "***** Testing times==NULL case *****" -run_test "" 400 "" "" SUCCESS y y +run_test -W "" 400 "" "" SUCCESS y y echo "***** Testing times=={ UTIME_NOW, UTIME_NOW } case *****" -run_test "" 400 "" "0 n 0 n" SUCCESS y y +run_test -W "" 400 "" "0 n 0 n" SUCCESS y y echo "***** Testing times=={ UTIME_OMIT, UTIME_OMIT } case *****" -run_test "" 400 "" "0 o 0 o" SUCCESS n n +run_test -W "" 400 "" "0 o 0 o" SUCCESS n n echo "***** Testing times=={ UTIME_NOW, UTIME_OMIT } case *****" -run_test "" 400 "" "0 n 0 o" SUCCESS y n +run_test -W "" 400 "" "0 n 0 o" SUCCESS y n echo "***** Testing times=={ UTIME_OMIT, UTIME_NOW } case *****" -run_test "" 400 "" "0 o 0 n" SUCCESS n y +run_test -W "" 400 "" "0 o 0 n" SUCCESS n y echo "***** Testing times=={ x, y } case *****" -run_test "" 400 "" "1 1 1 1" SUCCESS y y +run_test -W "" 400 "" "1 1 1 1" SUCCESS y y echo "============================================================" @@ -312,22 +312,22 @@ echo "Testing read-only file, not owned by self" echo echo "***** Testing times==NULL case *****" -run_test root 400 "" "" EACCES +run_test -RW root 400 "" "" EACCES echo "***** Testing times=={ UTIME_NOW, UTIME_NOW } case *****" -run_test root 400 "" "0 n 0 n" EACCES +run_test -RW root 400 "" "0 n 0 n" EACCES echo "***** Testing times=={ UTIME_OMIT, UTIME_OMIT } case *****" -run_test root 400 "" "0 o 0 o" SUCCESS n n +run_test -RW root 400 "" "0 o 0 o" SUCCESS n n echo "***** Testing times=={ UTIME_NOW, UTIME_OMIT } case *****" -run_test root 400 "" "0 n 0 o" EPERM +run_test -RW root 400 "" "0 n 0 o" EPERM echo "***** Testing times=={ UTIME_OMIT, UTIME_NOW } case *****" -run_test root 400 "" "0 o 0 n" EPERM +run_test -RW root 400 "" "0 o 0 n" EPERM echo "***** Testing times=={ x, y } case *****" -run_test root 400 "" "1 1 1 1" EPERM +run_test -RW root 400 "" "1 1 1 1" EPERM echo "============================================================" diff --git a/testcases/network/multicast/mc_opts/mc_opts b/testcases/network/multicast/mc_opts/mc_opts index 76fbe37..a0103bd 100755 --- a/testcases/network/multicast/mc_opts/mc_opts +++ b/testcases/network/multicast/mc_opts/mc_opts @@ -57,7 +57,7 @@ setup() mkdir -p $TCtmp for i in $EXECUTABLES do - install -m 0755 "$LTPROOT/$i" "$TCtmp/." + install -m 0755 "$LTPROOT/testcases/bin/$i" "$TCtmp/." done } hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-19 09:23:49
|
The branch, master, has been updated via a2739948cbdcb4a8981f3e75fe67f1921a075058 (commit) from b24cfbd96ade0853c6e7887d8254869fb7eb06c4 (commit) - Log ----------------------------------------------------------------- commit a2739948cbdcb4a8981f3e75fe67f1921a075058 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 02:21:13 2010 -0700 Update in the directions for new script name. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../Documentation/HOWTO_RunTests | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests b/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests index c6b503d..7b346ed 100644 --- a/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests +++ b/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests @@ -94,7 +94,7 @@ test suite. The available groups are: You can run the tests by executing: - bin/run-posix-option-group.sh [OPTION-GROUP] + bin/run-posix-option-group-test.sh [OPTION-GROUP] or run all of the tests by executing: hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-19 09:16:49
|
The branch, master, has been updated via b24cfbd96ade0853c6e7887d8254869fb7eb06c4 (commit) via fb777bd059bf2f3610fcd1c233182a572fcaef8d (commit) via b40d23ffb43a190f93872c42b16ff17c0fe41959 (commit) from c438631d5c1181bcb29e1af0e72a7d6c3beac7ca (commit) - Log ----------------------------------------------------------------- commit b24cfbd96ade0853c6e7887d8254869fb7eb06c4 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 02:14:30 2010 -0700 Update documentation. Signed-off-by: Garrett Cooper <yan...@gm...> commit fb777bd059bf2f3610fcd1c233182a572fcaef8d Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 02:13:37 2010 -0700 Add simple wrapper for running all option groups. Signed-off-by: Garrett Cooper <yan...@gm...> commit b40d23ffb43a190f93872c42b16ff17c0fe41959 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 02:12:46 2010 -0700 Rem. ambiguity by suffixing script name with test. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: .../Documentation/HOWTO_RunTests | 26 ++++++++++++++++++++ testcases/open_posix_testsuite/QUICK-START | 6 ++-- .../bin/run-all-posix-option-group-tests.sh | 19 ++++++++++++++ ...ion-group.sh => run-posix-option-group-test.sh} | 0 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 testcases/open_posix_testsuite/bin/run-all-posix-option-group-tests.sh rename testcases/open_posix_testsuite/bin/{run-posix-option-group.sh => run-posix-option-group-test.sh} (100%) diff --git a/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests b/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests index 2fc16f5..c6b503d 100644 --- a/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests +++ b/testcases/open_posix_testsuite/Documentation/HOWTO_RunTests @@ -77,6 +77,32 @@ To make only functional tests, run: To make only stress tests, run: # make stress-all +4. Running POSIX Option Group Feature Tests +----------------------------------------------------- + +There are several POSIX option groups available that can be tested with this +test suite. The available groups are: + + AIO | Asynchonous I/O + MEM | Memory + MSG | IPC + SEM | Semaphores + SIG | Signals + THR | Threading + TMR | Timers + TPS | Thread Execution Scheduling + +You can run the tests by executing: + + bin/run-posix-option-group.sh [OPTION-GROUP] + +or run all of the tests by executing: + + bin/run-all-posix-option-group-tests.sh + +More details about these features can be found on the OpenGroup site +(http://www.opengroup.org). + Contributors: rusty.lynch REMOVE-THIS AT intel DOT com julie.n.fleischer REMOVE-THIS AT intel DOT com rolla.n.selbak REMOVE-THIS AT intel DOT com diff --git a/testcases/open_posix_testsuite/QUICK-START b/testcases/open_posix_testsuite/QUICK-START index a4326f6..6afde74 100644 --- a/testcases/open_posix_testsuite/QUICK-START +++ b/testcases/open_posix_testsuite/QUICK-START @@ -32,11 +32,11 @@ Running the tests - make generate-makefiles - cd conformance/interfaces/pthread_create ; make all test -* Running tests for a specific focus is currently unavailable (but will be made - available again soon). +* Running tests for a specific focus can be done like so: + run-posix-option-group-test.sh [OPTION-GROUP] * For additional information on how to build and run the tests in this -suite, see Documentation/HOWTO_RunTests. + suite, see Documentation/HOWTO_RunTests. ========================== Documentation & Resources diff --git a/testcases/open_posix_testsuite/bin/run-all-posix-option-group-tests.sh b/testcases/open_posix_testsuite/bin/run-all-posix-option-group-tests.sh new file mode 100644 index 0000000..a9b2c05 --- /dev/null +++ b/testcases/open_posix_testsuite/bin/run-all-posix-option-group-tests.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# A simple wrapper for executing all of the tests. +# +# See COPYING for licensing details. +# +# Garrett Cooper, July 2010 +# + +FAILED=0 +RPOG_SCRIPT="$(dirname "$0")/run-posix-option-group-test.sh" + +for option_group in AIO MEM MSG SEM SIG THR TMR TPS; do + if ! $PROG_SCRIPT $option_group; then + FAILED=1 + fi +done + +exit $FAILED diff --git a/testcases/open_posix_testsuite/bin/run-posix-option-group.sh b/testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh similarity index 100% rename from testcases/open_posix_testsuite/bin/run-posix-option-group.sh rename to testcases/open_posix_testsuite/bin/run-posix-option-group-test.sh hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-19 09:02:34
|
The branch, master, has been updated via c438631d5c1181bcb29e1af0e72a7d6c3beac7ca (commit) via f00e5460ca56a657717f40129a2344903c858018 (commit) via 88ed43e8ff49f3c87d537bf5582496e6590c5b87 (commit) via 9cb1f4553342f6b821686bb9d3cb6053a8bf1da9 (commit) via 23a78c2a2072df0cfe54c24a110587568fb5e790 (commit) via dd3dab3e0a14dbfcdd8f580aaa47995ce9955e70 (commit) via 7062dd413122adbbf68d651876c0d289c0cf554e (commit) via 6269146fac7d23efcd6abe3f1f4913e9938b1603 (commit) via 842ec9e26e44eecd64183a6e5acb47037b4ad79a (commit) from 81db68ff88077a886a32f53b0216294305a65e37 (commit) - Log ----------------------------------------------------------------- commit c438631d5c1181bcb29e1af0e72a7d6c3beac7ca Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 02:00:02 2010 -0700 Simplify by using $(bindir). Signed-off-by: Garrett Cooper <yan...@gm...> commit f00e5460ca56a657717f40129a2344903c858018 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:55:01 2010 -0700 Make run-posix-option-group.sh use feature run.sh. This closes the missing integration piece between the previous version of the open_posix_testsuite, and the new version. Signed-off-by: Garrett Cooper <yan...@gm...> commit 88ed43e8ff49f3c87d537bf5582496e6590c5b87 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:43:20 2010 -0700 chmod run_test.sh in the target, not in make test. Signed-off-by: Garrett Cooper <yan...@gm...> commit 9cb1f4553342f6b821686bb9d3cb6053a8bf1da9 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:40:14 2010 -0700 Move run_tests to run-posix-option-group.sh. This is being done to be more explicit, and avoid ambiguity with bin/run-tests.sh (the test harness script). Signed-off-by: Garrett Cooper <yan...@gm...> commit 23a78c2a2072df0cfe54c24a110587568fb5e790 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:34:34 2010 -0700 Style. Signed-off-by: Garrett Cooper <yan...@gm...> commit dd3dab3e0a14dbfcdd8f580aaa47995ce9955e70 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:33:58 2010 -0700 s/PREFIX/prefix/ to be autoconf-like. Signed-off-by: Garrett Cooper <yan...@gm...> commit 7062dd413122adbbf68d651876c0d289c0cf554e Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:33:27 2010 -0700 Use proper autoconf-like variables. Signed-off-by: Garrett Cooper <yan...@gm...> commit 6269146fac7d23efcd6abe3f1f4913e9938b1603 Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:29:18 2010 -0700 SIGPOLL is XSI optional; conditionalize it. Signed-off-by: Garrett Cooper <yan...@gm...> commit 842ec9e26e44eecd64183a6e5acb47037b4ad79a Author: Garrett Cooper <yan...@gm...> Date: Mon Jul 19 01:28:02 2010 -0700 Add bits for autoconf-like variables for install. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/open_posix_testsuite/Makefile | 6 ++ testcases/open_posix_testsuite/bin/Makefile | 13 ++-- .../bin/run-posix-option-group.sh | 81 ++++++++++++++++++++ .../conformance/interfaces/sigset/5-1.c | 11 ++- testcases/open_posix_testsuite/run_tests | 72 ----------------- .../scripts/generate-makefiles.sh | 7 +- .../open_posix_testsuite/scripts/print-prefix.sh | 2 +- 7 files changed, 107 insertions(+), 85 deletions(-) create mode 100755 testcases/open_posix_testsuite/bin/run-posix-option-group.sh delete mode 100755 testcases/open_posix_testsuite/run_tests diff --git a/testcases/open_posix_testsuite/Makefile b/testcases/open_posix_testsuite/Makefile index d912201..97ab8fd 100644 --- a/testcases/open_posix_testsuite/Makefile +++ b/testcases/open_posix_testsuite/Makefile @@ -32,6 +32,12 @@ TEST_MAKE= env $(TEST_MAKE_ENV) $(MAKE) -k top_srcdir?= . +prefix?= `$(top_srcdir)/scripts/print_prefix.sh` + +datadir?= $(prefix)/share + +exec_prefix?= $(prefix) + all: conformance-all functional-all stress-all tools-all clean: $(CRITICAL_MAKEFILES) diff --git a/testcases/open_posix_testsuite/bin/Makefile b/testcases/open_posix_testsuite/bin/Makefile index 1bbeac1..b36e8a9 100644 --- a/testcases/open_posix_testsuite/bin/Makefile +++ b/testcases/open_posix_testsuite/bin/Makefile @@ -8,15 +8,14 @@ top_srcdir?= .. srcdir= $(top_srcdir)/bin +prefix?= `$(top_srcdir)/scripts/print-prefix.sh` + +bindir?= $(prefix)/bin + clean: @rm -f t0.val install: clean - @set -e; \ - INSTALL_DIR=`$(SHELL) $(top_srcdir)/scripts/print-prefix.sh`/bin/; \ - for i in `ls *`; do \ - install -m 0755 $$i $(DESTDIR)/$$INSTALL_DIR/. ;\ + @set -e; for i in `ls *`; do \ + install -m 0755 $$i $(DESTDIR)/$(bindir)/. ;\ done - - - diff --git a/testcases/open_posix_testsuite/bin/run-posix-option-group.sh b/testcases/open_posix_testsuite/bin/run-posix-option-group.sh new file mode 100755 index 0000000..5ec6e6a --- /dev/null +++ b/testcases/open_posix_testsuite/bin/run-posix-option-group.sh @@ -0,0 +1,81 @@ +#! /bin/sh +# Copyright (c) 2002, Intel Corporation. All rights reserved. +# Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com +# 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. +# +# Use to build and run tests for a specific area + +BASEDIR="$(dirname "$0")/../conformance/interfaces" + +usage() +{ + cat <<EOF +usage: $(basename "$0") [AIO|MEM|MSG|SEM|SIG|THR|TMR|TPS] + +Build and run the tests for POSIX area specified by the 3 letter tag +in the POSIX spec + +EOF +} + +run_option_group_tests() +{ + set -x + for test_script in $(find $1 -name run.sh); do + (cd "$(dirname "$test_script")" && ./$(basename "$test_script")) + done +} + +case $1 in +AIO) + echo "Executing asynchronous I/O tests" + run_option_group_tests "$BASEDIR/aio_*" + run_option_group_tests "$BASEDIR/lio_listio" + ;; +SIG) + echo "Executing signals tests" + run_option_group_tests "$BASEDIR/sig*" + run_option_group_tests $BASEDIR/raise + run_option_group_tests $BASEDIR/kill + run_option_group_tests $BASEDIR/killpg + run_option_group_tests $BASEDIR/pthread_kill + run_option_group_tests $BASEDIR/pthread_sigmask + ;; +SEM) + echo "Executing semaphores tests" + run_option_group_tests "$BASEDIR/sem*" + ;; +THR) + echo "Executing threads tests" + run_option_group_tests "$BASEDIR/pthread_*" + ;; +TMR) + echo "Executing timers and clocks tests" + run_option_group_tests "$BASEDIR/time*" + run_option_group_tests "$BASEDIR/*time" + run_option_group_tests "$BASEDIR/clock*" + run_option_group_tests $BASEDIR/nanosleep + ;; +MSG) + echo "Executing message queues tests" + run_option_group_tests "$BASEDIR/mq_*" + ;; +TPS) + echo "Executing process and thread scheduling tests" + run_option_group_tests "$BASEDIR/*sched*" + ;; +MEM) + echo "Executing mapped, process and shared memory tests" + run_option_group_tests "$BASEDIR/m*lock*" + run_option_group_tests "$BASEDIR/m*map" + run_option_group_tests "$BASEDIR/shm_*" + ;; +*) + usage + exit 1 + ;; +esac + +echo "****Tests Complete****" diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c index aec74ab..12350c0 100644 --- a/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c +++ b/testcases/open_posix_testsuite/conformance/interfaces/sigset/5-1.c @@ -32,7 +32,11 @@ int is_empty(sigset_t *set) { SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGPIPE, SIGQUIT, SIGSEGV, SIGTERM, SIGTSTP, SIGTTIN, SIGTTOU, - SIGUSR1, SIGUSR2, SIGPOLL, SIGPROF, SIGSYS, + SIGUSR1, SIGUSR2, +#ifdef SIGPOLL + SIGPOLL, +#endif + SIGPROF, SIGSYS, SIGTRAP, SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ }; for (i=0; i<NUMSIGNALS; i++) { @@ -52,7 +56,10 @@ int main() sigset_t mask; sigemptyset(&mask); - sigprocmask(SIG_SETMASK, &mask, NULL); + if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1) { + perror("sigprocmask(SIG_SETMASK, &mask, NULL) failed"); + return PTS_UNRESOLVED; + } if (sigset(SIGCHLD, myhandler) == SIG_ERR) { perror("Unexpected error while using sigset()"); diff --git a/testcases/open_posix_testsuite/run_tests b/testcases/open_posix_testsuite/run_tests deleted file mode 100755 index 1e06b9e..0000000 --- a/testcases/open_posix_testsuite/run_tests +++ /dev/null @@ -1,72 +0,0 @@ -#! /bin/sh -# Copyright (c) 2002, Intel Corporation. All rights reserved. -# Created by: julie.n.fleischer REMOVE-THIS AT intel DOT com -# 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. -# -# Use to build and run tests for a specific area - -BASEDIR=conformance/interfaces - -usage() -{ - cat <<EOF -Usage: $0 [AIO|MEM|MSG|SEM|SIG|THR|TMR|TPS] - -Build and run the tests for POSIX area specified by the 3 letter tag -in the POSIX spec - -EOF -} - -runtests() -{ - for test in `ls -d $1`; do - POSIX_TARGET=$test make build-tests - POSIX_TARGET=$test make run-tests - done -} - -case $1 in - AIO) echo "Executing asynchronous I/O tests" - runtests "$BASEDIR/aio_*" - runtests "$BASEDIR/lio_listio" - ;; - SIG) echo "Executing signals tests" - runtests "$BASEDIR/sig*" - runtests $BASEDIR/raise - runtests $BASEDIR/kill - runtests $BASEDIR/killpg - runtests $BASEDIR/pthread_kill - runtests $BASEDIR/pthread_sigmask - ;; - SEM) echo "Executing semaphores tests" - runtests "$BASEDIR/sem*" - ;; - THR) echo "Executing threads tests" - runtests "$BASEDIR/pthread_*" - ;; - TMR) echo "Executing timers and clocks tests" - runtests "$BASEDIR/time*" - runtests "$BASEDIR/*time" - runtests "$BASEDIR/clock*" - runtests $BASEDIR/nanosleep - ;; - MSG) echo "Executing message queues tests" - runtests "$BASEDIR/mq_*" - ;; - TPS) echo "Executing process and thread scheduling tests" - runtests "$BASEDIR/*sched*" - ;; - MEM) echo "Executing mapped, process and shared memory tests" - runtests "$BASEDIR/m*lock*" - runtests "$BASEDIR/m*map" - runtests "$BASEDIR/shm_*" - ;; - *) usage - exit 1 - ;; -esac - -echo "****Tests Complete****" diff --git a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh index 41bb387..b6e7b56 100755 --- a/testcases/open_posix_testsuite/scripts/generate-makefiles.sh +++ b/testcases/open_posix_testsuite/scripts/generate-makefiles.sh @@ -83,8 +83,9 @@ top_srcdir?= `echo "$prereq_dir" | sed -E -e 's,[^/]+,\.\.,g'` subdir= $prereq_cache_dir srcdir= \$(top_srcdir)/\$(subdir) -EXEC_PREFIX= $EXEC_PREFIX -INSTALL_DIR= \$(DESTDIR)/\$(EXEC_PREFIX)/\$(subdir) +prefix?= $PREFIX +exec_prefix?= \$(prefix) +INSTALL_DIR= \$(DESTDIR)/\$(exec_prefix)/\$(subdir) LOGFILE?= logfile # Build variables @@ -142,7 +143,6 @@ install: \$(INSTALL_DIR) run.sh done test: run.sh - @chmod +x run.sh @./run.sh \$(INSTALL_DIR): @@ -157,6 +157,7 @@ EOF run.sh: @echo '#/bin/sh' > \$@ @echo "\$(top_srcdir)/bin/run-tests.sh \$(subdir) $tests" >> \$@ + @chmod +x run.sh EOF fi diff --git a/testcases/open_posix_testsuite/scripts/print-prefix.sh b/testcases/open_posix_testsuite/scripts/print-prefix.sh index 5a552b8..795097f 100755 --- a/testcases/open_posix_testsuite/scripts/print-prefix.sh +++ b/testcases/open_posix_testsuite/scripts/print-prefix.sh @@ -7,4 +7,4 @@ else DEFAULT_PREFIX=/usr/local fi -echo ${PREFIX:=$DEFAULT_PREFIX/openposix_testsuite} +echo ${prefix:=$DEFAULT_PREFIX/openposix_testsuite} hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-14 05:14:28
|
The branch, master, has been updated via 81db68ff88077a886a32f53b0216294305a65e37 (commit) via ed960312534c233b96e8717fc98ff092cf43e51d (commit) from ddf8b0f527d529ab4b866f9126da9f4c8e163ff5 (commit) - Log ----------------------------------------------------------------- commit 81db68ff88077a886a32f53b0216294305a65e37 Merge: ed960312534c233b96e8717fc98ff092cf43e51d ddf8b0f527d529ab4b866f9126da9f4c8e163ff5 Author: Garrett Cooper <yan...@gm...> Date: Tue Jul 13 22:12:31 2010 -0700 Merge branch 'master' of ssh://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev commit ed960312534c233b96e8717fc98ff092cf43e51d Author: Garrett Cooper <yan...@gm...> Date: Tue Jul 13 22:10:33 2010 -0700 Differentiate SKIP from FAILED. This makes failure triage easier because FAILED occurs whenever a command is missing ($? => 1), so it's just easier to do things this way. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/open_posix_testsuite/bin/run-tests.sh | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/testcases/open_posix_testsuite/bin/run-tests.sh b/testcases/open_posix_testsuite/bin/run-tests.sh index b2ab6b5..f06f64f 100755 --- a/testcases/open_posix_testsuite/bin/run-tests.sh +++ b/testcases/open_posix_testsuite/bin/run-tests.sh @@ -52,7 +52,7 @@ run_test() { if [ "$ret_code" = "0" ]; then echo "$testname: execution: PASS" >> "${LOGFILE}" - else + elif [ -f "$1" ]; then case "$ret_code" in 1) msg="FAILED" @@ -75,6 +75,8 @@ run_test() { echo "$testname: execution: $msg: Output: " >> "${LOGFILE}" cat $complog >> "${LOGFILE}" echo "$testname: execution: $msg " + else + echo "$testname: execution: SKIPPED (test not present)" fi rm -f $complog hooks/post-receive -- ltp |
From: Garrett C. <ris...@li...> - 2010-07-12 10:44:21
|
The branch, master, has been updated via ddf8b0f527d529ab4b866f9126da9f4c8e163ff5 (commit) from 68f89536bf8b1611ebbe0216029930b1e18bf243 (commit) - Log ----------------------------------------------------------------- commit ddf8b0f527d529ab4b866f9126da9f4c8e163ff5 Author: Garrett Cooper <yan...@gm...> Date: Fri Jul 2 17:35:42 2010 -0700 make install for open_posix_testsuite isn't ready for primetime yet. Signed-off-by: Garrett Cooper <yan...@gm...> ----------------------------------------------------------------------- Summary of changes: testcases/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/Makefile b/testcases/Makefile index ea57e3d..2ed3f9c 100644 --- a/testcases/Makefile +++ b/testcases/Makefile @@ -47,7 +47,7 @@ trunk-all: open_posix_testsuite-all trunk-clean:: open_posix_testsuite-clean -trunk-install: open_posix_testsuite-install +#trunk-install: open_posix_testsuite-install open_posix_testsuite-%: open_posix_testsuite $(MAKE) -C $^ top_srcdir=$(abs_top_srcdir)/testcases/$^ $* hooks/post-receive -- ltp |