|
From: Fu, E. <el...@in...> - 2007-07-05 06:32:14
|
Thank you very much! I will check in PTS after I verified the patch.=20
Thanks
Elva Fu
-----Original Message-----
From: pos...@li... =
[mailto:pos...@li...] On Behalf Of =
Joseph S. Myers
Sent: 2007=C4=EA6=D4=C228=C8=D5 9:12
To: pos...@li...
Subject: [posixtest-discuss] Miscellaneous test harness fixes
This patch fixes some miscellaneous issues I've found in Open POSIX=20
testing.
- On 64-bit Power, function symbols point to function descriptors rather =
than directly to the function code, so the nm command must accept "main" =
being a data symbol.
- If a test gets killed with SIGINT, bash (possibly depending on how =
it's=20
configured) can interpret this as the user pressing Ctrl-C to interrupt=20
the whole script and so will exit after that test; running tests from=20
execute.sh in a separate shell command avoid this.
- Redirecting output from functional tests to separate files (a) yields=20
cleaner output from the functional tests and (b) helps avoid problems=20
where a test fails to terminate properly and that test ends up writing =
to=20
the same stdout as used by the rest of the test process carrying on =
after=20
the test failed to terminate properly.
Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/posixtest/posixtestsuite/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile 15 May 2006 07:49:03 -0000 1.30
+++ Makefile 28 Jun 2007 01:01:54 -0000
@@ -79,7 +79,7 @@
%.test: %.o
@COMPLOG=3D$(LOGFILE).$$$$; \
[ -f $< ] || exit 0; \
- { nm -g $< | grep -q " T main"; } || \
+ { nm -g $< | grep -q " [DT] main"; } || \
{ echo "$(@:.test=3D): link: SKIP" | tee -a $(LOGFILE) && exit 0; }; \
if $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) > $$COMPLOG 2>&1; \
then \
Index: execute.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/posixtest/posixtestsuite/execute.sh,v
retrieving revision 1.2
diff -u -r1.2 execute.sh
--- execute.sh 15 May 2006 07:49:03 -0000 1.2
+++ execute.sh 28 Jun 2007 01:01:54 -0000
@@ -233,7 +233,7 @@
then
FILEcut=3D`echo $FILE | cut -b3-80`
TOTAL=3D$TOTAL+1
- ./t0 $TIMEOUT_VAL $FILE > /dev/null 2>&1
+ sh -c "./t0 $TIMEOUT_VAL $FILE > /dev/null 2>&1"
=20
RET_VAL=3D$?
=20
Index: functional/mqueues/run.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/posixtest/posixtestsuite/functional/mqueues/run.sh,v
retrieving revision 1.1
diff -u -r1.1 run.sh
--- functional/mqueues/run.sh 28 Jan 2003 07:36:53 -0000 1.1
+++ functional/mqueues/run.sh 28 Jun 2007 01:02:03 -0000
@@ -12,7 +12,7 @@
{
echo "TEST: " $1
TOTAL=3D$TOTAL+1
- ./$1
+ ./$1 > $1.output 2>&1
if [ $? =3D=3D 0 ]; then
PASS=3D$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/semaphores/run.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/posixtest/posixtestsuite/functional/semaphores/run.sh,v
retrieving revision 1.2
diff -u -r1.2 run.sh
--- functional/semaphores/run.sh 28 Jan 2003 07:57:02 -0000 1.2
+++ functional/semaphores/run.sh 28 Jun 2007 01:02:03 -0000
@@ -12,7 +12,7 @@
{
echo "TEST: " $1
TOTAL=3D$TOTAL+1
- ./$1
+ ./$1 > $1.output 2>&1
if [ $? =3D=3D 0 ]; then
PASS=3D$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/threads/pi_test/run.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/posixtest/posixtestsuite/functional/threads/pi_test/run.sh,v
retrieving revision 1.3
diff -u -r1.3 run.sh
--- functional/threads/pi_test/run.sh 20 Jun 2003 09:59:46 -0000 1.3
+++ functional/threads/pi_test/run.sh 28 Jun 2007 01:02:03 -0000
@@ -21,7 +21,7 @@
{
echo "TEST: " $1
TOTAL=3D$TOTAL+1
- ./$1 > output.$1
+ ./$1 > output.$1 2>&1
if [ $? =3D=3D 0 ]; then
PASS=3D$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/threads/robust_test/run.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: =
/cvsroot/posixtest/posixtestsuite/functional/threads/robust_test/run.sh,v=
retrieving revision 1.1
diff -u -r1.1 run.sh
--- functional/threads/robust_test/run.sh 30 May 2003 21:33:04 -0000 1.1
+++ functional/threads/robust_test/run.sh 28 Jun 2007 01:02:03 -0000
@@ -7,7 +7,7 @@
{
echo "TEST: " $1
TOTAL=3D$TOTAL+1
- ./$1
+ ./$1 > $1.output 2>&1
if [ $? =3D=3D 0 ]; then
PASS=3D$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/timers/run.sh
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/posixtest/posixtestsuite/functional/timers/run.sh,v
retrieving revision 1.2
diff -u -r1.2 run.sh
--- functional/timers/run.sh 9 Jan 2003 22:11:16 -0000 1.2
+++ functional/timers/run.sh 28 Jun 2007 01:02:03 -0000
@@ -11,7 +11,7 @@
RunTest()
{
echo "TEST: " $1
- $1
+ $1 > $1.output 2>&1
if [ $? =3D=3D 0 ]; then
PASS=3D$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
--=20
Joseph S. Myers
jo...@co...
-------------------------------------------------------------------------=
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
posixtest-discuss mailing list
pos...@li...
https://lists.sourceforge.net/lists/listinfo/posixtest-discuss
|