fix "sigaction" tests
PATCH 1/1 fix "sigaction" tests
Hi,
POSIX "conformance/interfaces/sigaction/16-1" and other 25 tests failed with following message:
------------
conformance/interfaces/sigaction/16-1: execution: FAILED: Output:
Caught signal 6
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-1.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-10: execution: FAILED: Output:
Caught signal 13
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-10.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-11: execution: FAILED: Output:
Caught signal 3
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-11.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-12: execution: FAILED: Output:
Caught signal 11
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-12.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-13: execution: FAILED: Output:
Caught signal 15
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-13.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-14: execution: FAILED: Output:
Caught signal 20
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-14.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-15: execution: FAILED: Output:
Caught signal 21
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-15.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-16: execution: FAILED: Output:
Caught signal 22
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-16.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-17: execution: FAILED: Output:
Caught signal 10
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-17.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-18: execution: FAILED: Output:
Caught signal 12
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-18.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-19: execution: FAILED: Output:
Caught signal 29
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-19.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-2: execution: FAILED: Output:
Caught signal 14
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-2.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-20: execution: FAILED: Output:
Caught signal 27
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-20.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-21: execution: FAILED: Output:
Caught signal 31
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-21.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-22: execution: FAILED: Output:
Caught signal 5
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-22.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-23: execution: FAILED: Output:
Caught signal 23
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-23.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-24: execution: FAILED: Output:
Caught signal 26
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-24.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-25: execution: FAILED: Output:
Caught signal 24
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-25.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-26: execution: FAILED: Output:
Caught signal 25
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-26.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-3: execution: FAILED: Output:
Caught signal 7
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-3.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-4: execution: FAILED: Output:
Caught signal 17
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-4.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-5: execution: FAILED: Output:
Caught signal 18
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-5.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-6: execution: FAILED: Output:
Caught signal 8
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-6.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-7: execution: FAILED: Output:
Caught signal 1
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-7.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-8: execution: FAILED: Output:
Caught signal 4
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-8.c FAILED: The function returned EINTR while SA_RESTART is set conformance/interfaces/sigaction/16-9: execution: FAILED: Output:
Caught signal 2
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-9.c FAILED: The function returned EINTR while SA_RESTART is set
------------
Environment is as follows:
- RHEL4.8 (kernel version 2.6.9-89) --- (x86, x86_64, ia64)
- RHEL5.5 (kernel version 2.6.18-194) --- (x86, x86_64, ia64)
The cause of above error is that sem_wait() of the testing kernel version always returns with EINTR.
"man sem_wait" says:
------------
[...]
EINTR The call was interrupted by a signal handler.
[...]
NOTES
A signal handler always interrupts a blocked call to one of these
functions, regardless
of the use of the sigaction(2) SA_RESTART flag.
POSIX.1-2001.
------------
And "man 7 signal" of "RHEL6.0 Beta"(*) says:
------------
If a blocked call to one of the following interfaces is interrupted
by
a signal handler, then the call will be automatically restarted
after
the signal handler returns if the SA_RESTART flag was used;
otherwise
the call will fail with the error EINTR:
[...]
* POSIX semaphore interfaces: sem_wait(3) andsem_timedwait(3)
(since Linux 2.6.22; beforehand, always failed with EINTR).
[...]
Interruption of System Calls and Library Functions by Stop Signals
On Linux, even in the absence of signal handlers, certain
blocking
interfaces can fail with the error EINTR after the process is
stopped
by one of the stop signals and then resumed via SIGCONT.
This
behavior is not sanctioned by POSIX.1, and doesn’t occur on other
sys-
tems.
[...]
* Linux 2.6.21 and earlier: futex(2) FUTEX_WAIT,sem_timedwait(3),
sem_wait(3).
------------
(*) -- Above description didn't exist in "man" of RHEL4.8/5.5.
But "man" of RHEL6.0 Beta says that "sem_wait()" failed in the version earlier than Linux 2.6.22.
Therefore, These 26 tests are useful after 2.6.22 version, I think.
I tried to revised "testcases/open_posix_testsuite/conformance/interfaces/ sigaction/templates/template_16-1.in"
============
---
a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/
template_16-1.in 2010-10-14 03:58:31.000000000 +0900
+++
b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/
template_16-1.new 2010-10-18 17:47:40.000000000 +0900
@@ -55,6 +55,8 @@
#include <signal.h>
#include <errno.h>
+#include <sys/utsname.h>
+
/*************************************************************************** ***/
/*************************** Test framework
*******************************/
/*************************************************************************** ***/
@@ -124,6 +126,23 @@
return NULL;
}
+/* Checking for Kernel Version function */
+int kernel_ver_cmp(int k1, int k2, int k3)
+{
+ struct utsname buf;
+ int r1, r2, r3;
+
+ uname(&buf);
+ sscanf(buf.release, "%d.%d.%d", &r1, &r2, &r3);
+ if (r1 > k1)
+ return 0;
+ if (r2 > k2)
+ return 0;
+ if (r3 > k3)
+ return 0;
+ return 1;
+}
+
/* main function */
int main()
{
@@ -133,6 +152,12 @@
struct sigaction sa;
+ /* Checking for Kernel Version */
+ if ( kernel_ver_cmp(2, 6, 21) != 0 )
+ {
+ UNTESTED( "sem_wait() returned EINTR on kernel versions
lower than 2.6.22" );
+ }
+
/* Initialize output */
output_init();
============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------
Similar revisions are necessary for other 25 "sigaction" tests.
Regards--
-Tomonori Mitani
testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.new renamed from testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.in +25 -0
@@ -55,6 +55,8 @@ #include <signal.h> #include <errno.h> +#include <sys/utsname.h> + /******************************************************************************/ /*************************** Test framework *******************************/ /******************************************************************************/
@@ -124,6 +126,23 @@ return NULL; } +/* Checking for Kernel Version function */ +int kernel_ver_cmp(int k1, int k2, int k3) +{ + struct utsname buf; + int r1, r2, r3; + + uname(&buf); + sscanf(buf.release, "%d.%d.%d", &r1, &r2, &r3); + if (r1 > k1) + return 0; + if (r2 > k2) + return 0; + if (r3 > k3) + return 0; + return 1; +} + /* main function */ int main() {
@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
2010/10/31 Mitani <[email protected]>:
Quoted 244 lines
Hi,
POSIX "conformance/interfaces/sigaction/16-1" and other 25 tests failed with following message:
------------
conformance/interfaces/sigaction/16-1: execution: FAILED: Output:
Caught signal 6
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-1.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-10: execution: FAILED: Output:
Caught signal 13
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-10.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-11: execution: FAILED: Output:
Caught signal 3
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-11.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-12: execution: FAILED: Output:
Caught signal 11
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-12.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-13: execution: FAILED: Output:
Caught signal 15
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-13.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-14: execution: FAILED: Output:
Caught signal 20
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-14.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-15: execution: FAILED: Output:
Caught signal 21
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-15.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-16: execution: FAILED: Output:
Caught signal 22
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-16.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-17: execution: FAILED: Output:
Caught signal 10
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-17.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-18: execution: FAILED: Output:
Caught signal 12
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-18.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-19: execution: FAILED: Output:
Caught signal 29
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-19.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-2: execution: FAILED: Output:
Caught signal 14
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-2.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-20: execution: FAILED: Output:
Caught signal 27
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-20.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-21: execution: FAILED: Output:
Caught signal 31
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-21.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-22: execution: FAILED: Output:
Caught signal 5
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-22.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-23: execution: FAILED: Output:
Caught signal 23
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-23.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-24: execution: FAILED: Output:
Caught signal 26
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-24.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-25: execution: FAILED: Output:
Caught signal 24
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-25.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-26: execution: FAILED: Output:
Caught signal 25
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-26.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-3: execution: FAILED: Output:
Caught signal 7
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-3.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-4: execution: FAILED: Output:
Caught signal 17
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-4.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-5: execution: FAILED: Output:
Caught signal 18
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-5.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-6: execution: FAILED: Output:
Caught signal 8
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-6.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-7: execution: FAILED: Output:
Caught signal 1
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-7.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-8: execution: FAILED: Output:
Caught signal 4
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-8.c FAILED: The function returned EINTR whileSA_RESTARTis set conformance/interfaces/sigaction/16-9: execution: FAILED: Output:
Caught signal 2
[16:42:34]Test ../../../conformance/interfaces/sigaction/16-9.c FAILED: The function returned EINTR whileSA_RESTARTis set
------------Environment is as follows:
- RHEL4.8 (kernel version 2.6.9-89) --- (x86,x86_64, ia64)
- RHEL5.5 (kernel version 2.6.18-194) --- (x86,x86_64, ia64)The cause of above error is that
sem_wait()of the testing kernel version always returns with EINTR."man
sem_wait" says:
------------
[...]EINTR The call was interrupted by a signal handler.
[...]
NOTES
A signal handler always interrupts a blocked call to one of these functions, regardless
of the use of the sigaction(2)SA_RESTARTflag.POSIX.1-2001.
------------And "man 7 signal" of "RHEL6.0 Beta"(*) says:
------------
If a blocked call to one of the following interfaces is interrupted by
a signal handler, then the call will be automatically restarted after
the signal handler returns if theSA_RESTARTflag was used; otherwise
the call will fail with the error EINTR:[...]
* POSIX semaphore interfaces: sem_wait(3) and
sem_timedwait(3)
(since Linux 2.6.22; beforehand, always failed with EINTR).[...]
Interruption of System Calls and Library Functions by Stop Signals On Linux, even in the absence of signal handlers, certain blocking
interfaces can fail with the error EINTR after the process is stopped
by one of the stop signals and then resumed via SIGCONT. This
behavior is not sanctioned by POSIX.1, and doesn’t occur on other sys-
tems.[...]
* Linux 2.6.21 and earlier: futex(2)
FUTEX_WAIT,sem_timedwait(3),
sem_wait(3).------------
(*) -- Above description didn't exist in "man" of RHEL4.8/5.5. But "man" of RHEL6.0 Beta says that "sem_wait()" failed in the version earlier than Linux 2.6.22.Therefore, These 26 tests are useful after 2.6.22 version, I think.
I tried to revised "testcases/open_posix_testsuite/conformance/interfaces/ sigaction/templates/template_16-1.in"
============
---
a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/ template_16-1.in 2010-10-14 03:58:31.000000000 +0900
+++
b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/ template_16-1.new 2010-10-18 17:47:40.000000000 +0900testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.new renamed from testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.in +2
-0@@ -55,6 +55,8 @@ #include <signal.h> #include <errno.h> +#include <sys/utsname.h> + /*************************************************************************** ***//*************************** Test framework
*******************************//*************************************************************************** ***/
testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.new renamed from testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.in +23
-0@@ -124,6 +126,23 @@ return NULL; } +/* Checking for Kernel Version function */ +int kernel_ver_cmp(int k1, int k2, int k3) +{ + struct utsname buf; + int r1, r2, r3; + + uname(&buf); + sscanf(buf.release, "%d.%d.%d", &r1, &r2, &r3); + if (r1 > k1) + return 0; + if (r2 > k2) + return 0; + if (r3 > k3) + return 0; + return 1; +} + /* main function */ int main() {@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();============
Quoted 8 lines
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).
Thanks!
-Garrett
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 1 line · Garrett Cooper
2010/10/31 Mitani <[email protected]>:
...
Quoted 25 lines
Quoted 25 lines
int
main()
{testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.new renamed from testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.in +6
-0@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------
Quoted 5 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).
Do you mean the culprit is Linux-isms?
IMO, the test cases are good.
Gui
Quoted 3 lines
Thanks!
-Garrett
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 28 lines · Gui Jianfeng
Quoted 1 line · Garrett Cooper
2010/10/31 Mitani <[email protected]>:
...
Quoted 25 lines
Quoted 25 lines
int
main()
{testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.new renamed from testcases/open_posix_testsuite/conformance/interfaces/sigaction/templates/template_16-1.in +6
-0@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite. Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
...
Thanks,
-Garrett
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 33 lines · Garrett Cooper
Quoted 32 lines · Gui Jianfeng
Quoted 1 line · Garrett Cooper
2010/10/31 Mitani <[email protected]>:
...
Quoted 29 lines
Quoted 18 lines
int
main()
{(quoted diff) +6
-0@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();============
Quoted 8 lines
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).
Quoted 6 lines
Quoted 1 line
Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
This open_posix_suite is the part of LTP(linux test project), must we
make sure it can work at all versions of unix?
What about this patch? If you think so, other similar patchs will be post.
-------------------------------------------------------------------------------
At older linux kernel(2.6.22 before), a signal handler always interrupts a blocked call to one of these functions, regardless of the use of the sigaction SA_RESTART flag, so we should not test these cases at this situation.
Althought uname is not exsit at 4.3 BSD, but this open_posix_suite just the part of LTP(linux test project), so i think it's not a problem.
--- .../conformance/interfaces/sigaction/16-1.c | 27 ++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-)
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +27 -0
@@ -50,6 +50,7 @@ Anyway, a false negative status cannot be returned.#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/utsname.h> #include <semaphore.h> #include <signal.h>
@@ -95,6 +96,27 @@ Anyway, a false negative status cannot be returned.volatile sig_atomic_t caught =0 ;sem_t sem; +#define KERNEL_VERSION (a, b, c) (((a) << 16) + ((b) << 8) + (c)) + +int check_linux () +{ +struct utsname tn; +int r1, r2, r3; + +if (0 >uname (&tn)) { +UNRESOLVED ( errno,"uname failed" ); + } + +if (strcmp (tn.sysname,"Linux" ) !=0 ) +return 0 ; + +sscanf (tn.release,"%d.%d.%d" , &r1, &r2, &r3); +if (KERNEL_VERSION (r1, r2, r3) >=KERNEL_VERSION (2 ,6 ,22 )) +return 1 ; + +return 0 ; +} +/* Handler function */ void handler (int signo ) {
@@ -133,6 +155,11 @@ int main()struct sigaction sa; +if (!check_linux ()) +UNTESTED ("A signal handler always interrupts sem_wait " +"at linux release, regardless of the use of " +"the sigaction SA_RESTART flag" ); +/* Initialize output */ output_init ();
Signature · 20 lines
1.6.5.2 -- Regards Bian Naimeng ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
2010/11/17 Bian Naimeng <[email protected]>:
Quoted 38 lines
Quoted 35 lines · Garrett Cooper
Quoted 33 lines · Gui Jianfeng
Quoted 1 line · Garrett Cooper
2010/10/31 Mitani <[email protected]>:
...
Quoted 25 lines
Quoted 25 lines
int
main()
{testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +6
-0@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Quoted 4 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite. Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).Do you mean the culprit is Linux-isms?
Quoted 7 lines
Quoted 4 lines
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
This
open_posix_suiteis the part of LTP(linux test project), must we make sure it can work at all versions of unix?
I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
Quoted 58 lines
What about this patch? If you think so, other similar patchs will be post.
-------------------------------------------------------------------------------
At older linux kernel(2.6.22 before), a signal handler always interrupts a blocked call to one of these functions, regardless of the use of the sigaction
SA_RESTARTflag, so we should not test these cases at this situation.Althought uname is not exsit at 4.3 BSD, but this
open_posix_suitejust the part of LTP(linux test project), so i think it's not a problem.Signed-off-by Bian Naimeng <[email protected]>---
.../conformance/interfaces/sigaction/16-1.c | 27 ++++++++++++++++++++1 files changed, 27 insertions(+), 0 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +22
-0@@ -50,6 +50,7 @@ Anyway, a false negative status cannot be returned. #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/utsname.h> #include <semaphore.h> #include <signal.h>@@ -95,6 +96,27 @@ Anyway, a false negative status cannot be returned. volatile sig_atomic_t caught = 0; sem_t sem; +#define KERNEL_VERSION (a, b, c) (((a) << 16) + ((b) << 8) + (c)) + +int check_linux () +{ + struct utsname tn; + int r1, r2, r3; + + if (0 > uname(&tn)) { + UNRESOLVED( errno, "uname failed" ); + } + + if (strcmp(tn.sysname, "Linux") != 0) + return 0; + + sscanf(tn.release, "%d.%d.%d", &r1, &r2, &r3); + if (KERNEL_VERSION(r1, r2, r3) >= KERNEL_VERSION(2, 6, 22)) + return 1; + + return 0; +} + /* Handler function */ void handler( int signo ) {
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c int main() · line 164
Quoted 10 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +5
-0@@ -133,6 +155,11 @@ int main() struct sigaction sa; + if (!check_linux()) + UNTESTED( "A signal handler always interrupts sem_wait " + "at linux release, regardless of the use of " + "the sigaction SA_RESTART flag" ); + /* Initialize output */ output_init();
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 41 lines · Garrett Cooper
2010/11/17 Bian Naimeng <[email protected]>:
Quoted 40 lines
Quoted 38 lines · Garrett Cooper
Quoted 28 lines · Gui Jianfeng
Quoted 1 line · Garrett Cooper
2010/10/31 Mitani <[email protected]>:
...
Quoted 25 lines
Quoted 25 lines
int
main()
{testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +6
-0@@ -133,6 +152,12 @@struct sigaction sa; +/* Checking for Kernel Version */ +if (kernel_ver_cmp (2 ,6 ,21 ) !=0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } +/* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
Quoted 9 lines
Quoted 2 lines
This
open_posix_suiteis the part of LTP(linux test project), must we
make sure it can work at all versions of unix?I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
OK, i get it. Thanks. ^_^
Then, whether should we remove the following case, because it invokes the uname that it's not exsit at 4.3 BSD. conformance/interfaces/pthread_mutex_init/speculative/5-2.c
Thanks
Bian
Quoted 70 lines
Quoted 68 lines
What about this patch? If you think so, other similar patchs will be post.
-------------------------------------------------------------------------------
At older linux kernel(2.6.22 before), a signal handler always interrupts a blocked call to one of these functions, regardless of the use of the sigaction
SA_RESTARTflag, so we should not test these cases at this situation.Althought uname is not exsit at 4.3 BSD, but this
open_posix_suitejust the part of LTP(linux test project), so i think it's not a problem.Signed-off-by Bian Naimeng <[email protected]>--- .../conformance/interfaces/sigaction/16-1.c | 27 ++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-)testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +27
-0@@ -50,6 +50,7 @@ Anyway, a false negative status cannot be returned.#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/utsname.h> #include <semaphore.h> #include <signal.h> @@ -95,6 +96,27 @@ Anyway, a false negative status cannot be returned.volatile sig_atomic_t caught =0 ;sem_t sem; +#define KERNEL_VERSION (a, b, c) (((a) << 16) + ((b) << 8) + (c)) + +int check_linux () +{ +struct utsname tn; +int r1, r2, r3; + +if (0 >uname (&tn)) { +UNRESOLVED ( errno,"uname failed" ); + } + +if (strcmp (tn.sysname,"Linux" ) !=0 ) +return 0 ; + +sscanf (tn.release,"%d.%d.%d" , &r1, &r2, &r3); +if (KERNEL_VERSION (r1, r2, r3) >=KERNEL_VERSION (2 ,6 ,22 )) +return 1 ; + +return 0 ; +} +/* Handler function */ void handler (int signo ) {@@ -133,6 +155,11 @@ int main()struct sigaction sa; +if (!check_linux ()) +UNTESTED ("A signal handler always interrupts sem_wait " +"at linux release, regardless of the use of " +"the sigaction SA_RESTART flag" ); +/* Initialize output */ output_init ();
Signature · 14 lines
Regards Bian Naimeng ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 164 lines
-----Original Message-----
From: Bian Naimeng [mailto:[email protected]]
Sent: Thursday, November 18, 2010 2:00 PM
To: Garrett Cooper
Cc: Gui Jianfeng; [email protected]; 當座 健市; Mitani
Subject: Re: [LTP] [PATCH] fix "sigaction" testsQuoted 4 lines · Garrett Cooper
2010/11/17 Bian Naimeng <[email protected]>:
Quoted 3 lines
Quoted 1 line · Garrett Cooper
On Mon, Nov 1, 2010 at 1:00 AM, Gui Jianfeng
Quoted 7 lines · <[email protected]> wrote:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 1 line · Garrett Cooper
2010/10/31 Mitani <[email protected]>:
...
Quoted 4 lines
Quoted 4 lines
int
main()
{(quoted diff) +0
-0@@ -133,6 +152,12 @@Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Review line 158
Quoted 6 lines
(quoted diff) +4
-0struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernelversions
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +2
-0lower than 2.6.22" ); + } +/* Initialize output */ output_init ();Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cdtestcases/open_posix_testsuite/conformance/interfaces/sigaction/
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
#./gentests.pl
------------Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slapme
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
or whoever did the commit).
Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
This
open_posix_suiteis the part of LTP(linux test project), mustwe
Quoted 8 lines
Quoted 1 line
make sure it can work at all versions of unix?
I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
OK, i get it. Thanks. ^_^
Then, whether should we remove the following case, because it invokes the uname that it's not exsit at 4.3 BSD. conformance/interfaces/pthread_mutex_init/speculative/5-2.c
Thanks
BianQuoted 1 line
Quoted 1 line
What about this patch? If you think so, other similar patchs will
be post.
Quoted 2 lines
Quoted 2 lines
--------------------------------------------------------------------
-----------Quoted 2 lines
Quoted 2 lines
At older linux kernel(2.6.22 before), a signal handler always
interrupts a
Quoted 1 line
Quoted 1 line
blocked call to one of these functions, regardless of the use of the
sigaction
Quoted 3 lines
Quoted 3 lines
SA_RESTARTflag, so we should not test these cases at this situation.Althought uname is not exsit at 4.3 BSD, but this
open_posix_suitejust
Quoted 6 lines
Quoted 6 lines
the part of LTP(linux test project), so i think it's not a problem.
Signed-off-by Bian Naimeng <[email protected]>--- .../conformance/interfaces/sigaction/16-1.c | 27++++++++++++++++++++
Quoted 3 lines
Quoted 3 lines
1 files changed, 27 insertions(+), 0 deletions(-)diff --git
a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c
Quoted 2 lines
Quoted 2 lines
index 706dbfc..3d6e1a1 100644
---a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c
Quoted 1 line
Quoted 1 line
+++
b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c
Quoted 6 lines
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +1
-0@@ -50,6 +50,7 @@ Anyway, a false negative status cannot be returned.#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/utsname.h> Quoted 7 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c Anyway, a false negative status cannot be returned. · line 99
Quoted 7 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +1
-0#include <semaphore.h> #include <signal.h> @@ -95,6 +96,27 @@ Anyway, a false negative status cannot be returned.volatile sig_atomic_t caught =0 ;sem_t sem; +#define KERNEL_VERSION (a, b, c) (((a) << 16) + ((b) << 8) +(c))
Quoted 25 lines
Quoted 25 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +20
-0+ +int check_linux () +{ +struct utsname tn; +int r1, r2, r3; + +if (0 >uname (&tn)) { +UNRESOLVED ( errno,"uname failed" ); + } + +if (strcmp (tn.sysname,"Linux" ) !=0 ) +return 0 ; + +sscanf (tn.release,"%d.%d.%d" , &r1, &r2, &r3); +if (KERNEL_VERSION (r1, r2, r3) >=KERNEL_VERSION (2 ,6 ,22 )) +return 1 ; + +return 0 ; +} +/* Handler function */ void handler (int signo ) {@@ -133,6 +155,11 @@ int main()Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c int main()
Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +2
-0struct sigaction sa; +if (!check_linux ()) + UNTESTED( "A signal handler always interrupts sem_wait"
Quoted 1 line
Review int main() · line 160
Quoted 1 line
(quoted diff) +1
-0+ "at linux release, regardless of the useof "
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c int main() · line 164
Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +2
-0+ "the sigaction SA_RESTART flag" ); +/* Initialize output */ output_init ();
Quoted 3 lines
--
Regards
Bian Naimeng
I applied Bian's patch in my system, and build succeeded.
I'm OK with the Bian's patch.
Thank you--
-Tomonori Mitani
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 81 lines
Quoted 81 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
#./gentests.pl
------------Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slapme
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
or whoever did the commit).
Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
This
open_posix_suiteis the part of LTP(linux test project), mustwe
Quoted 7 lines
Quoted 1 line
make sure it can work at all versions of unix?
I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
OK, i get it. Thanks. ^_^
Then, whether should we remove the following case, because it invokes the uname that it's not exsit at 4.3 BSD. conformance/interfaces/pthread_mutex_init/speculative/5-2.c
Thanks
BianQuoted 1 line
Quoted 1 line
What about this patch? If you think so, other similar patchs will
be post.
Quoted 1 line
Quoted 1 line
--------------------------------------------------------------------
-----------Quoted 1 line
Quoted 1 line
At older linux kernel(2.6.22 before), a signal handler always
interrupts a
Quoted 1 line
Quoted 1 line
blocked call to one of these functions, regardless of the use of the
sigaction
Quoted 3 lines
Quoted 3 lines
SA_RESTARTflag, so we should not test these cases at this situation.Althought uname is not exsit at 4.3 BSD, but this
open_posix_suitejust
Quoted 6 lines
Quoted 6 lines
the part of LTP(linux test project), so i think it's not a problem.
Signed-off-by Bian Naimeng <[email protected]>--- .../conformance/interfaces/sigaction/16-1.c | 27++++++++++++++++++++
Quoted 3 lines
Quoted 3 lines
1 files changed, 27 insertions(+), 0 deletions(-)diff --git
a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c
Quoted 2 lines
Quoted 2 lines
index 706dbfc..3d6e1a1 100644
---a/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c
Quoted 1 line
Quoted 1 line
+++
b/testcases/open_posix_testsuite/conformance/interfaces/sigaction/16 -1.c
Quoted 6 lines
Quoted 6 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +1
-0@@ -50,6 +50,7 @@ Anyway, a false negative status cannot be returned.#include <stdlib.h> #include <string.h> #include <unistd.h> +#include <sys/utsname.h> Quoted 7 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c Anyway, a false negative status cannot be returned. · line 99
Quoted 7 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +1
-0#include <semaphore.h> #include <signal.h> @@ -95,6 +96,27 @@ Anyway, a false negative status cannot be returned.volatile sig_atomic_t caught =0 ;sem_t sem; +#define KERNEL_VERSION (a, b, c) (((a) << 16) + ((b) << 8) +(c))
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +5
-0+ +int check_linux () +{ +struct utsname tn; +int r1, r2, r3;Quoted 8 lines
Quoted 8 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c Anyway, a false negative status cannot be returned. · line 112
Quoted 8 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +8
-0+ +if (0 >uname (&tn)) { +UNRESOLVED ( errno,"uname failed" ); + } + +if (strcmp (tn.sysname,"Linux" ) !=0 ) +return 0 ; +
Sorry for my mistake, here should return 1.
Quoted 24 lines
Quoted 24 lines
Quoted 12 lines
Quoted 12 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +7
-0+sscanf (tn.release,"%d.%d.%d" , &r1, &r2, &r3); +if (KERNEL_VERSION (r1, r2, r3) >=KERNEL_VERSION (2 ,6 ,22 )) +return 1 ; + +return 0 ; +} +/* Handler function */ void handler (int signo ) {@@ -133,6 +155,11 @@ int main()Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c int main()
Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +2
-0struct sigaction sa; +if (!check_linux ()) + UNTESTED( "A signal handler always interrupts sem_wait"
Quoted 1 line
Review int main() · line 160
Quoted 1 line
(quoted diff) +1
-0+ "at linux release, regardless of the useof "
Quoted 5 lines
Quoted 4 lines
testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +2
-0+ "the sigaction SA_RESTART flag" ); +/* Initialize output */ output_init ();
Quoted 9 lines
Quoted 3 lines
--
Regards
Bian NaimengI applied Bian's patch in my system, and build succeeded.
I'm OK with the Bian's patch.
Thanks for confirmation.
Signature · 14 lines
Regards Bian Naimeng ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 45 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 26 lines
...
Quoted 25 lines
Quoted 25 lines
int
main()
{testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +6
-0@@ -133,6 +152,12 @@struct sigaction sa; +/* Checking for Kernel Version */ +if (kernel_ver_cmp (2 ,6 ,21 ) !=0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } +/* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
Quoted 9 lines
Quoted 2 lines
This
open_posix_suiteis the part of LTP(linux test project), must we
make sure it can work at all versions of unix?I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
Quoted 6 lines
OK, i get it. Thanks. ^_^
Then, whether should we remove the following case, because it invokes the uname that it's not exsit at 4.3 BSD. conformance/interfaces/pthread_mutex_init/speculative/5-2.c
The uname() is part of the POSIX, for sure it's available on BSD.
Thinking of it, the patch that checks for kernel version only when sysname == Linux should compile and work. But the question here is if we want to bloat the tests with workarounds for broken systems. I would rather see this covered by a database of known issues, so you can easily copare results and read why your system is broken.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 50 lines
Quoted 50 lines
Quoted 49 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 26 lines
...
Quoted 25 lines
Quoted 25 lines
int
main()
{testcases/open_posix_testsuite/conformance/interfaces/sigaction/16-1.c +6
-0@@ -133,6 +152,12 @@struct sigaction sa; +/* Checking for Kernel Version */ +if (kernel_ver_cmp (2 ,6 ,21 ) !=0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } +/* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite.
Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
Quoted 8 lines
Quoted 2 lines
This
open_posix_suiteis the part of LTP(linux test project), must we
make sure it can work at all versions of unix?I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
OK, i get it. Thanks. ^_^
Then, whether should we remove the following case, because it invokes the uname that it's not exsit at 4.3 BSD. conformance/interfaces/pthread_mutex_init/speculative/5-2.c
Quoted 7 lines
Quoted 2 lines
The
uname()is part of the POSIX, for sure it's available on BSD.Maybe i miss somethings, but the IEEE Std 1003.1-2008 said:
"Theuname()function originated in System III, System V, and related implementations, and it does not exist in Version 7 or 4.3 BSD. The values it returns are set at system compile time in those historical implementations."
Well BSD 4.3 has been released in 1986. The recent BSD systems (tested on FreeBSD 8.0) should be fine.
Quoted 9 lines
Quoted 6 lines
Thinking of it, the patch that checks for kernel version only when sysname == Linux should compile and work. But the question here is if we want to bloat the tests with workarounds for broken systems. I would rather see this covered by a database of known issues, so you can easily copare results and read why your system is broken.
OK, if we have this database, it looks good to me.
Garrett pointed out the results mailing list. I'm however not reading it either.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 82 lines
Quoted 53 lines
Quoted 53 lines
Quoted 52 lines
Quoted 43 lines
Quoted 35 lines
Quoted 35 lines
Quoted 35 lines
Quoted 26 lines
...
Quoted 25 lines
Quoted 25 lines
int
main()
{(quoted diff) +6
-0@@ -133,6 +152,12 @@ struct sigaction sa; + /* Checking for Kernel Version */ + if ( kernel_ver_cmp(2, 6, 21) != 0 ) + { + UNTESTED( "sem_wait() returned EINTR on kernel versions lower than 2.6.22" ); + } + /* Initialize output */ output_init();============
Above patch is revision only for templates.
The following procedure is necessary after applying patch:
------------
#cd testcases/open_posix_testsuite/conformance/interfaces/sigaction/ #./gentests.pl
------------Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Similar revisions are necessary for other 25 "sigaction" tests.
Sorry, but Linux-isms can't leak into the
open_posix_testsuite. Same with BSDisms (at least they shouldn't... if they do, then slap me or whoever did the commit).Do you mean the culprit is Linux-isms?
Mitani-san is proposing that I `fix' the testcases to work on RHEL 4.8. These testcases should function with minimal change for all versions of Unix.
Quoted 8 lines
Quoted 2 lines
This
open_posix_suiteis the part of LTP(linux test project), must we make sure it can work at all versions of unix?I use it in FreeBSD and others have used it in other versions of Unix (in the past), based on the README. There's no reason why we need to maintain something that philosophically diverges from the upstream project's goal because it will make merging more painful and unnecessary.
Quoted 6 lines
OK, i get it. Thanks. ^_^
Then, whether should we remove the following case, because it invokes the uname that it's not exsit at 4.3 BSD. conformance/interfaces/pthread_mutex_init/speculative/5-2.c
The
uname()is part of the POSIX, for sure it's available on BSD.Quoted 7 lines
Quoted 4 lines
Maybe i miss somethings, but the IEEE Std 1003.1-2008 said:
"Theuname()function originated in System III, System V, and related implementations, and it does not exist in Version 7 or 4.3 BSD. The values it returns are set at system compile time in those historical implementations."Well BSD 4.3 has been released in 1986. The recent BSD systems (tested on FreeBSD 8.0) should be fine.
The uname system call is fairly standard on all versions of Unix
(and guess what folks -- it's POSIX standard too!).
The point wasn't to discount the value of adding uname, but where
do you stop in trying to ?
If you guys want functionality to _remove_ testcases for local
execution, then I'm willing to help there. Otherwise, there will be no end to this hack mess.Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Thinking of it, the patch that checks for kernel version only when sysname == Linux should compile and work. But the question here is if we want to bloat the tests with workarounds for broken systems. I would rather see this covered by a database of known issues, so you can easily copare results and read why your system is broken.
Quoted 5 lines
Quoted 2 lines
OK, if we have this database, it looks good to me.
Garrett pointed out the results mailing list. I'm however not reading it either.
Quoted 6 lines
Yes, because it's mostly spam and a support email alias nowadays (instead of the emails coming here they go there >:(...). I need to come up with a script anyhow to aggregate the results and ship them off via LTP (not the
open_posix_testsuitebecause I'm not going to commit those bits there). IIRC there's a script in tools that can do that.
I'm not, in any way, for poluting tests with workarounds for broken systems (as I stated before). I was just explaining that uname() _is_, as a matter of fact, available on modern UNIXes.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list