[vorbis-tools] 03/04: Added simple autopkgtest script to verify vcut no longer segfaults.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu May 26 07:38:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository vorbis-tools.

commit 7bce75c9744077fa400fcf1ff394f5350b889ade
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu May 26 09:36:06 2016 +0200

    Added simple autopkgtest script to verify vcut no longer segfaults.
---
 debian/rules                 |  6 ++++++
 debian/tests/control         |  3 +++
 debian/tests/test-vcut-crash | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/debian/rules b/debian/rules
index 0114f60..b29ca67 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,3 +27,9 @@ override_dh_install:
 # tmp fix for #359068 while upstream accepts our patch to configure.ac
 #CFLAGS += -D_FILE_OFFSET_BITS=64
 
+# Run our test suite until the upstream source get one
+override_dh_auto_test:
+	dh_auto_test
+	for t in debian/tests/test-*; do \
+	    BUILDDIR=`pwd` $$t; \
+	done
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..90067b0
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: test-vcut-crash
+Depends: @, debconf, valgrind
+Restrictions: allow-stderr
diff --git a/debian/tests/test-vcut-crash b/debian/tests/test-vcut-crash
new file mode 100755
index 0000000..27d500e
--- /dev/null
+++ b/debian/tests/test-vcut-crash
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Test if bug #818037, segfault in vcut, still exist.
+
+RETVAL=0
+
+set -e
+set -x
+
+at_exit() {
+    set +x
+    echo "info: test exiting, removing $WORKDIR"
+    rm -rf $WORKDIR
+}
+WORKDIR=$(mktemp -d)
+trap at_exit INT TERM EXIT
+set -x
+
+cd $WORKDIR
+env |grep vorb
+
+if type valgrind >/dev/null 2>&1 ; then
+    VALGRIND=valgrind
+fi
+
+VCUT=vcut
+if [ -x ${BUILDDIR}/vcut/vcut ] ; then
+    VCUT=${BUILDDIR}/vcut/vcut
+fi
+
+head -c 500000 /dev/zero | oggenc -Q -r -o 1.ogg -
+
+if $VALGRIND $VCUT 1.ogg 2.ogg 3.ogg +1 ; then
+    echo "success: vcut worked"
+else
+    echo "error: vcut didn't work."
+    RETVAL=1
+fi
+
+rm -f 1.ogg 2.ogg 3.ogg
+
+exit $RETVAL

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xiph/vorbis-tools.git



More information about the pkg-xiph-commits mailing list