pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/tests ChangeLog bugs/signals.sh


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/tests ChangeLog bugs/signals.sh
Date: Wed, 22 Nov 2006 14:28:25 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 06/11/22 14:28:25

Modified files:
        tests          : ChangeLog 
        tests/bugs     : signals.sh 

Log message:
        Fix race condition in tests/bugs/signals.sh.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/tests/ChangeLog?cvsroot=pspp&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/pspp/tests/bugs/signals.sh?cvsroot=pspp&r1=1.1&r2=1.2

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/tests/ChangeLog,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- ChangeLog   22 Nov 2006 04:24:03 -0000      1.66
+++ ChangeLog   22 Nov 2006 14:28:24 -0000      1.67
@@ -1,3 +1,7 @@
+Wed Nov 22 06:28:04 2006  Ben Pfaff  <address@hidden>
+
+       * tests/bugs/signals.sh: Fix race condition.
+
 Sun Nov 19 09:23:34 2006  Ben Pfaff  <address@hidden>
 
        * automake.mk: Add the new tests listed below.

Index: bugs/signals.sh
===================================================================
RCS file: /cvsroot/pspp/pspp/tests/bugs/signals.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- bugs/signals.sh     14 Nov 2006 12:29:26 -0000      1.1
+++ bugs/signals.sh     22 Nov 2006 14:28:24 -0000      1.2
@@ -27,9 +27,6 @@
        return ; 
      fi
      rm -rf $TEMPDIR
-
-     # Kill any remaining children of this shell
-     kill `ps h --ppid $$ | awk '{print $1}'` 2> /dev/null
 }
 
 
@@ -60,41 +57,20 @@
 
 cd $TEMPDIR
 
-
-activity="run program in interactive mode"
-cat | $PSPP --testing-mode -o raw-ascii 2> $TEMPDIR/stderr1  > /dev/null & 
-thepid1=$!
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program in interactive mode 2"
-cat | $PSPP --testing-mode -o raw-ascii 2> $TEMPDIR/stderr2  > /dev/null & 
-thepid2=$!
-if [ $? -ne 0 ] ; then no_result ; fi
-
-# This one is a dummy.  Despite the sleep command,  it may not be enought 
-# to ensure that the preceeding pspp has actually initialised itself.
-activity="run program in interactive mode 3"
-cat | $PSPP --testing-mode -o raw-ascii 2> /dev/null  > /dev/null & sleep 1
-thepid3=$!
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="sending SIGINT to pspp1"
-kill -INT $thepid1
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="sending SIGSEGV to pspp2"
-kill -SEGV $thepid2
+activity="sending SIGINT to pspp"
+echo 'host kill -INT $PPID' | $PSPP --testing-mode -o raw-ascii > /dev/null 2> 
$TEMPDIR/stderr1
 if [ $? -ne 0 ] ; then no_result ; fi
 
-
 # SIGINT should have caused a clean shutdown
-
 activity="checking for absence of error messages 1"
 [ ! -s $TEMPDIR/stderr1 ]  
 if [ $? -ne 0 ] ; then fail ; fi
 
-# SIGSEGV should have caused an error message
+activity="sending SIGSEGV to pspp"
+echo 'host kill -SEGV $PPID' | $PSPP --testing-mode -o raw-ascii > /dev/null 
2> $TEMPDIR/stderr2
+if [ $? -eq 0 ] ; then no_result ; fi
 
+# SIGSEGV should have caused an error message
 activity="checking for error messages from pspp 2"
 head -8 $TEMPDIR/stderr2 > $TEMPDIR/stderr-head
 if [ $? -ne 0 ] ; then no_result ; fi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]