]> git.proxmox.com Git - mirror_zfs-debian.git/blob - debian/tests/kernel-smoke-test
Add isolation-machine restriction to autopkgtest.
[mirror_zfs-debian.git] / debian / tests / kernel-smoke-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2016 Canonical
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #
19 #
20 # We run all the tests in this specific order from this
21 # main script so that we don't have to go through the
22 # pain of checking and rebuilding installing and removing
23 # the modules for each test. A good smoke test will
24 # exercise all the base functionality with the same
25 # instance of the ZFS spl and zfs drivers to see what
26 # the cumulative testing of each scenario does to the
27 # environment.
28 #
29 TESTS="kernel-smoke-test-pool-2x2-mirror kernel-smoke-test-pool-4x1-mirror kernel-smoke-test-pool-nested-raidz3 kernel-smoke-test-pool-raidz1 kernel-smoke-test-pool-raidz2 kernel-smoke-test-pool-raidz3 kernel-smoke-test-pool-striped kernel-smoke-test-zil kernel-smoke-test-filesystem kernel-smoke-test-snapshot kernel-smoke-test-clone kernel-smoke-test-send-receive kernel-smoke-test-scrub"
30 rc=0
31 #
32 # We only test on 64 bit arches for the moment
33 # as these are the ones that ZFS supports.
34 #
35 if [ `getconf LONG_BIT` = "32" ]
36 then
37 echo "Testing on 32 bit architectures not possible."
38 exit 0
39 fi
40
41 # Load zfs kernel module before tests
42 /sbin/modprobe zfs
43
44 for t in ${TESTS}
45 do
46 ./debian/tests/$t
47 if [ $? -ne 0 ]; then
48 rc=1
49 fi
50 done
51 exit $rc