I found three errors in the previous patch (shebang, heredoc and test
stderr output). Updated patch attached. Details of what I fixed are in
the Ubuntu bug:
https://bugs.launchpad.net/ubuntu/+source/crash/+bug/1217474

Thanks.
diff -u crash-6.1.6/debian/control crash-6.1.6/debian/control
--- crash-6.1.6/debian/control
+++ crash-6.1.6/debian/control
@@ -6,6 +6,7 @@
 Uploaders:
 Build-Depends: debhelper (>= 9), dpkg-dev (>= 1.16.1), quilt (>= 0.47), 
binutils, binutils-dev, zlib1g-dev, libncurses5-dev
 Standards-Version: 3.9.3.1
+XS-Testsuite: autopkgtest
 
 Package: crash
 Architecture: i386 ia64 alpha powerpc amd64 armhf
diff -u crash-6.1.6/debian/changelog crash-6.1.6/debian/changelog
--- crash-6.1.6/debian/changelog
+++ crash-6.1.6/debian/changelog
@@ -1,3 +1,9 @@
+crash (6.1.6-1ubuntu2) saucy; urgency=low
+
+  * Add a live autopkgtest to run crash on running kernel. 
+
+ -- Chris J Arges <chris.j.ar...@canonical.com>  Tue, 27 Aug 2013 12:37:03 
-0500
+
 crash (6.1.6-1ubuntu1) saucy; urgency=low
 
   * Merge from Debian unstable. Remaining changes:
only in patch2:
unchanged:
--- crash-6.1.6.orig/debian/tests/control
+++ crash-6.1.6/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: live
+Restrictions: needs-root allow-stderr
+Depends: @, lsb-release
only in patch2:
unchanged:
--- crash-6.1.6.orig/debian/tests/live
+++ crash-6.1.6/debian/tests/live
@@ -0,0 +1,20 @@
+#!/bin/sh -x
+set -e
+
+echo "Adding linux-image debug symbols."
+if [ "$(lsb_release -is)" = "Debian" ]; then
+    sudo apt-get install linux-image-$(uname -r)-dbg
+elif [ "$(lsb_release -is)" = "Ubuntu" ]; then
+    sudo tee /etc/apt/sources.list.d/ddebs.list << EOF
+    deb http://ddebs.ubuntu.com/ $(lsb_release -cs)          main restricted 
universe multiverse
+    deb http://ddebs.ubuntu.com/ $(lsb_release -cs)-security main restricted 
universe multiverse
+    deb http://ddebs.ubuntu.com/ $(lsb_release -cs)-updates  main restricted 
universe multiverse
+    deb http://ddebs.ubuntu.com/ $(lsb_release -cs)-proposed main restricted 
universe multiverse
+EOF
+    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
ECDCAD72428D7C01
+    sudo apt-get update
+    sudo apt-get install linux-image-$(uname -r)-dbgsym
+fi
+
+echo "Testing crash on live kernel"
+sudo crash -st /usr/lib/debug/boot/vmlinux-$(uname -r)

Reply via email to