|
From: Joseph S. M. <jo...@co...> - 2007-06-28 01:12:11
|
This patch fixes some miscellaneous issues I've found in Open POSIX
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
configured) can interpret this as the user pressing Ctrl-C to interrupt
the whole script and so will exit after that test; running tests from
execute.sh in a separate shell command avoid this.
- Redirecting output from functional tests to separate files (a) yields
cleaner output from the functional tests and (b) helps avoid problems
where a test fails to terminate properly and that test ends up writing to
the same stdout as used by the rest of the test process carrying on after
the test failed to terminate properly.
Index: Makefile
===================================================================
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=$(LOGFILE).$$$$; \
[ -f $< ] || exit 0; \
- { nm -g $< | grep -q " T main"; } || \
+ { nm -g $< | grep -q " [DT] main"; } || \
{ echo "$(@:.test=): link: SKIP" | tee -a $(LOGFILE) && exit 0; }; \
if $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) > $$COMPLOG 2>&1; \
then \
Index: execute.sh
===================================================================
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=`echo $FILE | cut -b3-80`
TOTAL=$TOTAL+1
- ./t0 $TIMEOUT_VAL $FILE > /dev/null 2>&1
+ sh -c "./t0 $TIMEOUT_VAL $FILE > /dev/null 2>&1"
RET_VAL=$?
Index: functional/mqueues/run.sh
===================================================================
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=$TOTAL+1
- ./$1
+ ./$1 > $1.output 2>&1
if [ $? == 0 ]; then
PASS=$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/semaphores/run.sh
===================================================================
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=$TOTAL+1
- ./$1
+ ./$1 > $1.output 2>&1
if [ $? == 0 ]; then
PASS=$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/threads/pi_test/run.sh
===================================================================
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=$TOTAL+1
- ./$1 > output.$1
+ ./$1 > output.$1 2>&1
if [ $? == 0 ]; then
PASS=$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/threads/robust_test/run.sh
===================================================================
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=$TOTAL+1
- ./$1
+ ./$1 > $1.output 2>&1
if [ $? == 0 ]; then
PASS=$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
Index: functional/timers/run.sh
===================================================================
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 [ $? == 0 ]; then
PASS=$PASS+1
echo -ne "\t\t\t***TEST PASSED***\n\n"
--
Joseph S. Myers
jo...@co...
|