]>
git.proxmox.com Git - mirror_spl-debian.git/blob - scripts/check.sh
4 spl_module
=..
/module
/spl
/spl.ko
5 splat_module
=..
/module
/splat
/splat.ko
10 echo "${prog}: $1" >&2
15 echo "${prog}: $1" >&2
22 if [ -n "$TESTS" ]; then
28 if [ $
(id
-u) != 0 ]; then
29 die
"Must run as root"
32 if /sbin
/lsmod |
egrep -q "^spl|^splat"; then
33 die
"Must start with spl modules unloaded"
36 if [ ! -f ${spl_module} ] ||
[ ! -f ${splat_module} ]; then
37 die
"Source tree must be built, run 'make'"
40 spl_module_params
="spl_debug_mask=-1 spl_debug_subsys=-1"
41 echo "Loading ${spl_module}"
42 /sbin
/insmod
${spl_module} ${spl_module_params} || die "Failed to load ${spl_module}"
44 echo "Loading
${splat_module}"
45 /sbin/insmod ${splat_module} || die "Unable to load
${splat_module}"
47 # Wait a maximum of 3 seconds for udev to detect the new splatctl
48 # device, if we do not see the character device file created assume
49 # udev is not running and manually create the character device.
50 for i in `seq 1 50`; do
53 if [ -c /dev/splatctl ]; then
57 if [ $i -eq 50 ]; then
58 mknod /dev/splatctl c 229 0
62 $splat_cmd $tests $verbose
64 echo "Unloading
${splat_module}"
65 /sbin/rmmod ${splat_module} || die "Failed to unload
${splat_module}"
67 echo "Unloading
${spl_module}"
68 /sbin/rmmod ${spl_module} || die "Unable to unload
${spl_module}"