On Fri, May 30, 2008 at 01:07:15PM -0400, Jason Stover wrote:
     
     Only two tests fail:
     
     tests/bugs/signals.sh
     tests/bugs/overwrite-input-file.sh


OK.  I think the attached patch will improve matters. It makes the
tests use $PPID if it's available, otherwise it resorts to `ps -o ppid
-p $$ | tail -1`.  

After applying this patch, on my solaris box tests/bugs/signals.sh
still fails about 20% of the time. But I've looked at it, and
concluded that this is a timing issue and relates to the way we're
doing the test.  It's not a failure of the functionality we're testing.

J'     

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


? diffs
? etch.patch
? etch3.patch
? sol-test.patch
? x.patch
? po/pspp.pot
? tests/.libs
Index: tests/bugs/overwrite-input-file.sh
===================================================================
RCS file: /sources/pspp/pspp/tests/bugs/overwrite-input-file.sh,v
retrieving revision 1.4
diff -b -w -U 3 -r1.4 overwrite-input-file.sh
--- tests/bugs/overwrite-input-file.sh	20 May 2008 02:20:33 -0000	1.4
+++ tests/bugs/overwrite-input-file.sh	31 May 2008 01:14:55 -0000
@@ -92,13 +92,13 @@
 
 
 activity="create program 2"
-cat > $TESTFILE <<EOF
+cat > $TESTFILE <<'EOF'
 GET 'foo.sav'.
 COMPUTE Y = X + 1.
 XSAVE OUTFILE='foo.sav'.
 XEXPORT OUTFILE='foo.por'.
 PRINT OUTFILE='foo.data'.
-HOST kill -TERM \$PPID
+HOST kill -TERM `test -z "$PPID" && ps -o ppid -p $$ | tail -1 || echo $PPID`.
 EOF
 if [ $? -ne 0 ] ; then no_result ; fi
 
@@ -108,8 +108,9 @@
 # status of a process terminated by a signal be greater than 128.
 if [ $? -le 128 ] ; then no_result ; fi
 
+
 activity="check for remaining temporary files"
-if test -e *.tmp*; then fail; fi
+if test -f *.tmp*; then fail; fi
 
 activity="compare output 1"
 cmp foo.sav foo.sav.backup
@@ -146,7 +147,7 @@
 if [ $? -ne 0 ] ; then no_result ; fi
 
 activity="check for remaining temporary files"
-if test -e *.tmp*; then fail; fi
+if test -f *.tmp*; then fail; fi
 
 activity="create program 4"
 cat > $TESTFILE <<EOF
Index: tests/bugs/signals.sh
===================================================================
RCS file: /sources/pspp/pspp/tests/bugs/signals.sh,v
retrieving revision 1.4
diff -b -w -U 3 -r1.4 signals.sh
--- tests/bugs/signals.sh	20 May 2008 01:03:22 -0000	1.4
+++ tests/bugs/signals.sh	31 May 2008 01:14:55 -0000
@@ -59,7 +59,7 @@
 cd $TEMPDIR
 
 activity="sending SIGINT to pspp"
-echo 'host kill -INT $PPID' | $PSPP --testing-mode > /dev/null 2> $TEMPDIR/stderr1
+echo 'host kill -INT `test -z "$PPID" && ps -o ppid -p $$ | tail -1 || echo $PPID`.' | $PSPP --testing-mode > /dev/null 2> $TEMPDIR/stderr1
 if [ $? -ne 0 ] ; then no_result ; fi
 
 # SIGINT should have caused a clean shutdown
@@ -68,7 +68,7 @@
 if [ $? -ne 0 ] ; then fail ; fi
 
 activity="sending SIGSEGV to pspp"
-echo 'host kill -SEGV $PPID' | $PSPP --testing-mode > /dev/null 2> $TEMPDIR/stderr2
+echo 'host kill -SEGV `test -z "$PPID" && ps -o ppid -p $$ | tail -1 || echo $PPID`.' | $PSPP --testing-mode > /dev/null 2> $TEMPDIR/stderr2
 if [ $? -eq 0 ] ; then no_result ; fi
 
 # SIGSEGV should have caused an error message

Attachment: signature.asc
Description: Digital signature

_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to