]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
A patch for the "Open POSIX Test Suite"
authorJulian Seward <jseward@acm.org>
Thu, 6 Jul 2006 01:54:34 +0000 (01:54 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 6 Jul 2006 01:54:34 +0000 (01:54 +0000)
(http://posixtest.sourceforge.net) version 1.5.1, which makes it
possible to run the suite on V and conveniently compare results
against a native run (using the diff-results script).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5982

auxprogs/Makefile.am
auxprogs/posixtestsuite-1.5.1-diff-results [new file with mode: 0755]
auxprogs/posixtestsuite-1.5.1-diff.txt [new file with mode: 0644]

index 336124b684a2550f327618d82039ec3504292cdf..8eb572822d26408a5e3d5e9ba852f0d7fb4061df 100644 (file)
@@ -5,7 +5,9 @@ bin_PROGRAMS = valgrind-listener
 
 noinst_SCRIPTS = gen-mdg DotToScc.hs primes.c \
                gsl16test gsl16-badfree.patch gsl16-wavelet.patch \
-               ppcfround.c ppc64shifts.c libmpiwrap.c mpiwrap_type_test.c
+               ppcfround.c ppc64shifts.c libmpiwrap.c mpiwrap_type_test.c \
+               posixtestsuite-1.5.1-diff-results \
+               posixtestsuite-1.5.1-diff.txt
 
 EXTRA_DIST = $(noinst_SCRIPTS)
 
diff --git a/auxprogs/posixtestsuite-1.5.1-diff-results b/auxprogs/posixtestsuite-1.5.1-diff-results
new file mode 100755 (executable)
index 0000000..a7aada7
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+usage()
+{
+    cat <<EOF
+
+Usage: $0 result_file_1 result_file_2
+
+EOF
+}
+
+if [ $# != 2 ]; then
+   usage;
+   exit 1;
+else
+   echo $1 $2;
+   rm -f tmptmp_1 tmptmp_2;
+   grep -v GRIND= $1 > tmptmp_1;
+   grep -v GRIND= $2 > tmptmp_2;
+   diff -U2 tmptmp_1 tmptmp_2;
+fi
diff --git a/auxprogs/posixtestsuite-1.5.1-diff.txt b/auxprogs/posixtestsuite-1.5.1-diff.txt
new file mode 100644 (file)
index 0000000..61404c2
--- /dev/null
@@ -0,0 +1,149 @@
+Only in posixtestsuite/conformance/interfaces/pthread_spin_lock: 1-1
+diff -U3 -r posixtestsuite.orig/conformance/interfaces/pthread_spin_lock/1-1.c posixtestsuite/conformance/interfaces/pthread_spin_lock/1-1.c
+--- posixtestsuite.orig/conformance/interfaces/pthread_spin_lock/1-1.c 2003-07-10 02:19:34.000000000 +0100
++++ posixtestsuite/conformance/interfaces/pthread_spin_lock/1-1.c      2006-07-05 15:38:27.000000000 +0100
+@@ -39,7 +39,8 @@
+ static void sig_handler()
+ {
+       /* Just return */
+-      pthread_exit(0);
++        /* pthread_exit(0); */
++        exit(0);
+       return;
+ }
+diff -U3 -r posixtestsuite.orig/LDFLAGS posixtestsuite/LDFLAGS
+--- posixtestsuite.orig/LDFLAGS        2005-06-03 02:32:42.000000000 +0100
++++ posixtestsuite/LDFLAGS     2006-07-05 13:03:09.000000000 +0100
+@@ -8,7 +8,7 @@
+ #-lpthread -D_GNU_SOURCE
+ #
+ #Recommended flags:
+-#-D_XOPEN_SOURCE=600 -lpthread -lrt -lm
++-D_XOPEN_SOURCE=600 -lpthread -lrt -lm
+ #
+ # For use with Linux, you may try the following flags to
+ # allow for the NPTL-specific compilation (used in some test cases)
+diff -U3 -r posixtestsuite.orig/locate-test posixtestsuite/locate-test
+--- posixtestsuite.orig/locate-test    2005-03-14 13:53:50.000000000 +0000
++++ posixtestsuite/locate-test 2006-07-05 13:16:52.000000000 +0100
+@@ -60,19 +60,19 @@
+           shift;
+           ;;
+       "--fmake")
+-          find functional/ -type f -maxdepth 2 -mindepth 2 -name "Makefile" -exec dirname '{}' ';'
++          find functional/ -maxdepth 2 -mindepth 2 -type f -name "Makefile" -exec dirname '{}' ';'
+           exit 0;
+           ;;
+       "--frun")
+-          find functional/ -type f -maxdepth 2 -mindepth 2 -name "run.sh" -exec dirname '{}' ';' 
++          find functional/ -maxdepth 2 -mindepth 2 -type f -name "run.sh" -exec dirname '{}' ';' 
+           exit 0;
+           ;;
+       "--smake")
+-          find stress/ -type f -maxdepth 2 -mindepth 2 -name "Makefile" -exec dirname '{}' ';'
++          find stress/ -maxdepth 2 -mindepth 2 -type f -name "Makefile" -exec dirname '{}' ';'
+           exit 0;
+           ;;
+       "--srun")
+-          find stress/ -type f -maxdepth 2 -mindepth 2 -name "run.sh" -exec dirname '{}' ';'
++          find stress/ -maxdepth 2 -mindepth 2 -type f -name "run.sh" -exec dirname '{}' ';'
+           exit 0;
+           ;;
+       "--help")
+diff -U3 -r posixtestsuite.orig/Makefile posixtestsuite/Makefile
+--- posixtestsuite.orig/Makefile       2005-03-14 13:53:41.000000000 +0000
++++ posixtestsuite/Makefile    2006-07-05 16:28:57.000000000 +0100
+@@ -19,7 +19,7 @@
+ # Added tests timeout from Sebastien Decugis (http://nptl.bullopensource.org) 
+ # Expiration delay is 120 seconds
+-TIMEOUT_VAL = 120
++TIMEOUT_VAL = 15
+ # The following value is the shell return value of a timedout application.
+ # with the bash shell, the ret val of a killed application is 128 + signum
+ # and under Linux, SIGALRM=14, so we have (Linux+bash) 142.
+@@ -99,7 +99,8 @@
+ %.run-test: %.test $(top_builddir)/t0
+       @COMPLOG=$(LOGFILE).$$$$; \
+       [ -f $< ] || exit 0; \
+-      $(TIMEOUT) $< > $$COMPLOG 2>&1; \
++      echo "$(@:.run-test=): GRIND=$(GRIND)" | tee -a $(LOGFILE); \
++      $(TIMEOUT) $(GRIND) $< > $$COMPLOG 2>&1; \
+       RESULT=$$?; \
+       if [ $$RESULT -eq 1 ]; \
+       then \
+@@ -141,11 +142,12 @@
+       @echo Building timeout helper files; \
+       $(CC) -O2 -o $@ $< ; \
+       echo `$(top_builddir)/t0 0; echo $$?` > $(top_builddir)/t0.val
+-      
++
+ %.run-test: %.sh $(top_builddir)/t0
+       @COMPLOG=$(LOGFILE).$$$$; \
++      echo "$(@:.run-test=): GRIND=$(GRIND)" | tee -a $(LOGFILE); \
+       chmod +x $<; \
+-      $(TIMEOUT) $< > $$COMPLOG 2>&1; \
++      $(TIMEOUT) $(GRIND) $< > $$COMPLOG 2>&1; \
+       RESULT=$$?; \
+       if [ $$RESULT -eq 0 ]; \
+       then \
+diff -U3 -r posixtestsuite.orig/run_tests posixtestsuite/run_tests
+--- posixtestsuite.orig/run_tests      2004-12-16 09:56:18.000000000 +0000
++++ posixtestsuite/run_tests   2006-07-05 19:06:48.000000000 +0100
+@@ -12,11 +12,14 @@
+ usage()
+ {
+     cat <<EOF 
+-Usage: $0 [AIO|MEM|MSG|SEM|SIG|THR|TMR|TPS]
++Usage: $0 [AIO|MEM|MSG|SEM|SIG|THR|TMR|TPS |ALL]
+ Build and run the tests for POSIX area specified by the 3 letter tag
+ in the POSIX spec
++Optionally, set env variable GRIND to be the Valgrind and args used
++to run the tests (eg, GRIND="vTRUNK --tool=none").
++
+ EOF
+ }
+@@ -64,6 +67,39 @@
+       runtests "$BASEDIR/m*map"
+       runtests "$BASEDIR/shm_*"
+       ;;
++
++
++  ALL) echo "Executing all tests"
++      echo "Executing asynchronous I/O tests"
++      runtests "$BASEDIR/aio_*"
++      runtests "$BASEDIR/lio_listio"
++      echo "Executing signals tests"
++      runtests "$BASEDIR/sig*"
++      runtests $BASEDIR/raise
++      runtests $BASEDIR/kill
++      runtests $BASEDIR/killpg
++      runtests $BASEDIR/pthread_kill
++      runtests $BASEDIR/pthread_sigmask
++      echo "Executing semaphores tests"
++      runtests "$BASEDIR/sem*"
++      echo "Executing threads tests"
++      runtests "$BASEDIR/pthread_*"
++      echo "Executing timers and clocks tests"
++      runtests "$BASEDIR/time*"
++      runtests "$BASEDIR/*time"
++      runtests "$BASEDIR/clock*"
++      runtests $BASEDIR/nanosleep
++      echo "Executing message queues tests"
++      runtests "$BASEDIR/mq_*"
++      echo "Executing process and thread scheduling tests"
++      runtests "$BASEDIR/*sched*"
++      echo "Executing mapped, process and shared memory tests"
++      runtests "$BASEDIR/m*lock*"
++      runtests "$BASEDIR/m*map"
++      runtests "$BASEDIR/shm_*"
++      ;;
++
++
+   *)  usage
+       exit 1
+       ;;