[Pkg-zfsonlinux-devel] [SCM] spl branch, master, updated. debian/0.6.5.7-1-9-ga373b5a

Petter Reinholdtsen pere at hungry.com
Sun Sep 18 06:55:42 UTC 2016


The following commit has been merged in the master branch:
commit a373b5ab6f2bd6c9f7952c114eafa566ed4937a9
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sun Sep 18 08:55:30 2016 +0200

    Added extra autopkgtest script check.sh from the Ubuntu package.

diff --git a/scripts/check.sh b/debian/tests/check.sh
old mode 100755
new mode 100644
similarity index 59%
copy from scripts/check.sh
copy to debian/tests/check.sh
index fc97cec..be35e87
--- a/scripts/check.sh
+++ b/debian/tests/check.sh
@@ -26,10 +26,37 @@
 ###############################################################################
 
 prog=check.sh
-spl_module=../module/spl/spl.ko
-splat_module=../module/splat/splat.ko
-splat_cmd=../cmd/splat
-verbose=
+spl_module=spl
+splat_module=splat
+splat_cmd=/usr/sbin/splat
+
+#
+#  The following subset work in a timely way and don't time out
+#  when running inside a VM with < 4GB of memory
+#
+SPLAT_TESTS=\
+"kmem:kmem_alloc kmem:kmem_zalloc kmem:vmem_alloc "\
+"kmem:vmem_zalloc kmem:slab_small "\
+"kmem:slab_reap kmem:slab_age "\
+"kmem:slab_lock taskq:single taskq:multiple "\
+"taskq:system taskq:wait taskq:front taskq:recurse "\
+"taskq:contention taskq:delay taskq:cancel taskq:dynamic "\
+"krng:all mutex:all condvar:all thread:all rwlock:all "\
+"time:all vnode:all kobj:all atomic:all list:all "\
+"generic:all cred:all zlib:all linux:all"
+
+memtotal=$(grep "MemTotal" /proc/meminfo | awk '{print $2}')
+if [ ! -z $memtotal ]; then
+        if [ $memtotal -gt 4194304 ]; then
+		SPLAT_TESTS="kmem:slab_large kmem:slab_align $SPLAT_TESTS"
+        fi
+fi
+
+tests=""
+for t in ${SPLAT_TESTS}
+do
+        tests="${tests} -t $t"
+done
 
 die() {
 	echo "${prog}: $1" >&2
@@ -40,14 +67,13 @@ warn() {
 	echo "${prog}: $1" >&2
 }
 
-if [ -n "$V" ]; then
-	verbose="-v"
+if [ $(getconf LONG_BIT) != 64 ]; then
+	echo "Skipping test, only valid for 64 bit architectures"
+	exit 0
 fi
 
-if [ -n "$TESTS" ]; then
-	tests="$TESTS"
-else
-	tests="-a"
+if [ -n "$V" ]; then
+	verbose="-v"
 fi
 
 if [ $(id -u) != 0 ]; then
@@ -58,18 +84,18 @@ if /sbin/lsmod | egrep -q "^spl|^splat"; then
 	die "Must start with spl modules unloaded"
 fi
 
-if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then
-	die "Source tree must be built, run 'make'"
-fi
+#if [ ! -f ${spl_module} ] || [ ! -f ${splat_module} ]; then
+#	die "Source tree must be built, run 'make'"
+#fi
 
 /sbin/modprobe zlib_inflate &>/dev/null
 /sbin/modprobe zlib_deflate &>/dev/null
 
 echo "Loading ${spl_module}"
-/sbin/insmod ${spl_module} || die "Failed to load ${spl_module}"
+/sbin/modprobe ${spl_module} || die "Failed to load ${spl_module}"
 
 echo "Loading ${splat_module}"
-/sbin/insmod ${splat_module} || die "Unable to load ${splat_module}"
+/sbin/modprobe ${splat_module} || die "Unable to load ${splat_module}"
 
 # Wait a maximum of 3 seconds for udev to detect the new splatctl 
 # device, if we do not see the character device file created assume
@@ -86,12 +112,12 @@ for i in `seq 1 50`; do
 	fi
 done
 
-$splat_cmd $tests $verbose
+$splat_cmd --nocolor $tests $verbose
 
 echo "Unloading ${splat_module}"
-/sbin/rmmod ${splat_module} || die "Failed to unload ${splat_module}"
+/sbin/modprobe -r ${splat_module} || die "Failed to unload ${splat_module}"
 
 echo "Unloading ${spl_module}"
-/sbin/rmmod ${spl_module} || die "Unable to unload ${spl_module}"
+/sbin/modprobe -r ${spl_module} || die "Unable to unload ${spl_module}"
 
 exit 0
diff --git a/debian/tests/control b/debian/tests/control
index f6e24e0..1239bcf 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,3 @@
-Tests: dkms-test
-Restrictions: needs-root, allow-stderr
+Tests: dkms-test check.sh
+Restrictions: needs-root, allow-stderr, isolation-machine
 Depends: dkms

-- 
Solaris Porting Layer for Linux



More information about the Pkg-zfsonlinux-devel mailing list