test.sh revision 7bcd865d386d96caac83cb1c589fdb8f9ce3b081
beaad6ac31022179c44d88536811e9ccd9425696nd#!/bin/bash
beaad6ac31022179c44d88536811e9ccd9425696nd# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
beaad6ac31022179c44d88536811e9ccd9425696nd# ex: ts=8 sw=4 sts=4 et filetype=sh
db878466c5e95073429dda0bdd001f45e9486e16fieldingTEST_DESCRIPTION="Job merging"
db878466c5e95073429dda0bdd001f45e9486e16fielding
db878466c5e95073429dda0bdd001f45e9486e16fieldingKVERSION=${KVERSION-$(uname -r)}
db878466c5e95073429dda0bdd001f45e9486e16fieldingKERNEL_VER=$(uname -r)
db878466c5e95073429dda0bdd001f45e9486e16fielding
db878466c5e95073429dda0bdd001f45e9486e16fielding# Uncomment this to debug failures
beaad6ac31022179c44d88536811e9ccd9425696nd#DEBUGFAIL="systemd.unit=multi-user.target"
beaad6ac31022179c44d88536811e9ccd9425696ndDEBUGTOOLS="df free ls stty cat ps ln ip route dmesg dhclient mkdir cp ping dhclient strace less grep id tty touch du sort"
beaad6ac31022179c44d88536811e9ccd9425696nd
beaad6ac31022179c44d88536811e9ccd9425696ndrun_qemu() {
beaad6ac31022179c44d88536811e9ccd9425696nd # TODO: qemu wrapper script: http://www.spinics.net/lists/kvm/msg72389.html
beaad6ac31022179c44d88536811e9ccd9425696nd qemu-kvm \
beaad6ac31022179c44d88536811e9ccd9425696nd -hda $TESTDIR/rootdisk.img \
beaad6ac31022179c44d88536811e9ccd9425696nd -m 512M -nographic \
beaad6ac31022179c44d88536811e9ccd9425696nd -net none -kernel /boot/vmlinuz-$KERNEL_VER \
beaad6ac31022179c44d88536811e9ccd9425696nd -append "root=/dev/sda1 systemd.log_level=debug raid=noautodetect loglevel=2 init=/usr/lib/systemd/systemd ro console=ttyS0,115200n81 selinux=0 $DEBUGFAIL" || return 1
01c674544bd4c211141bcd9fb09b96ffc18c6c3dnd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ret=1
01c674544bd4c211141bcd9fb09b96ffc18c6c3dnd mkdir -p $TESTDIR/root
3726777f47ac4bba3e21b075905959bbea47e72eerikabele mount ${LOOPDEV}p1 $TESTDIR/root
3726777f47ac4bba3e21b075905959bbea47e72eerikabele [[ -e $TESTDIR/root/testok ]] && ret=0
3726777f47ac4bba3e21b075905959bbea47e72eerikabele cp -a $TESTDIR/root/failed $TESTDIR
3726777f47ac4bba3e21b075905959bbea47e72eerikabele cp -a $TESTDIR/root/var/log/journal $TESTDIR
7e68fce3cbd2246164e045a51ecd77f9f26680ednd umount $TESTDIR/root
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cat $TESTDIR/failed
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ls -l $TESTDIR/journal/*/*.journal
7e68fce3cbd2246164e045a51ecd77f9f26680ednd test -s $TESTDIR/failed && ret=$(($ret+1))
7e68fce3cbd2246164e045a51ecd77f9f26680ednd return $ret
66e48875fca2df6669dab4f2690ee36c6913c0ffnd}
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680edndrun_nspawn() {
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ../../systemd-nspawn -b -D $TESTDIR/nspawn-root /usr/lib/systemd/systemd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ret=1
7e68fce3cbd2246164e045a51ecd77f9f26680ednd [[ -e $TESTDIR/nspawn-root/testok ]] && ret=0
f1110149b5b6c28ecc39d1958d98ad9cfa8e41f3nd cp -a $TESTDIR/nspawn-root/failed $TESTDIR
f1110149b5b6c28ecc39d1958d98ad9cfa8e41f3nd cp -a $TESTDIR/nspawn-root/var/log/journal $TESTDIR
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cat $TESTDIR/failed
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ls -l $TESTDIR/journal/*/*.journal
7e68fce3cbd2246164e045a51ecd77f9f26680ednd test -s $TESTDIR/failed && ret=$(($ret+1))
7e68fce3cbd2246164e045a51ecd77f9f26680ednd return $ret
66e48875fca2df6669dab4f2690ee36c6913c0ffnd}
66e48875fca2df6669dab4f2690ee36c6913c0ffnd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680edndtest_run() {
66e48875fca2df6669dab4f2690ee36c6913c0ffnd if check_qemu ; then
66e48875fca2df6669dab4f2690ee36c6913c0ffnd run_qemu || return 1
7e68fce3cbd2246164e045a51ecd77f9f26680ednd else
7e68fce3cbd2246164e045a51ecd77f9f26680ednd dwarn "can't run qemu-kvm, skipping"
66e48875fca2df6669dab4f2690ee36c6913c0ffnd fi
66e48875fca2df6669dab4f2690ee36c6913c0ffnd if check_nspawn; then
7e68fce3cbd2246164e045a51ecd77f9f26680ednd run_nspawn || return 1
7e68fce3cbd2246164e045a51ecd77f9f26680ednd else
7e68fce3cbd2246164e045a51ecd77f9f26680ednd dwarn "can't run systemd-nspawn, skipping"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd fi
7e68fce3cbd2246164e045a51ecd77f9f26680ednd return 0
7e68fce3cbd2246164e045a51ecd77f9f26680ednd}
66e48875fca2df6669dab4f2690ee36c6913c0ffnd
66e48875fca2df6669dab4f2690ee36c6913c0ffndtest_setup() {
7e68fce3cbd2246164e045a51ecd77f9f26680ednd rm -f $TESTDIR/rootdisk.img
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # Create the blank file to use as a root filesystem
7e68fce3cbd2246164e045a51ecd77f9f26680ednd dd if=/dev/null of=$TESTDIR/rootdisk.img bs=1M seek=200
7e68fce3cbd2246164e045a51ecd77f9f26680ednd LOOPDEV=$(losetup --show -P -f $TESTDIR/rootdisk.img)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd [ -b $LOOPDEV ] || return 1
7e68fce3cbd2246164e045a51ecd77f9f26680ednd echo "LOOPDEV=$LOOPDEV" >> $STATEFILE
8cfbcde8e416fd60132dd4324c42a5098da156cfnd sfdisk -C 6400 -H 2 -S 32 -L $LOOPDEV <<EOF
8cfbcde8e416fd60132dd4324c42a5098da156cfnd,3200
7e68fce3cbd2246164e045a51ecd77f9f26680ednd,
7e68fce3cbd2246164e045a51ecd77f9f26680edndEOF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd mkfs.ext3 -L systemd ${LOOPDEV}p1
7e68fce3cbd2246164e045a51ecd77f9f26680ednd echo -n test >$TESTDIR/keyfile
66e48875fca2df6669dab4f2690ee36c6913c0ffnd mkdir -p $TESTDIR/root
66e48875fca2df6669dab4f2690ee36c6913c0ffnd mount ${LOOPDEV}p1 $TESTDIR/root
7e68fce3cbd2246164e045a51ecd77f9f26680ednd mkdir -p $TESTDIR/root/run
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # Create what will eventually be our root filesystem onto an overlay
7e68fce3cbd2246164e045a51ecd77f9f26680ednd (
7e68fce3cbd2246164e045a51ecd77f9f26680ednd LOG_LEVEL=5
7e68fce3cbd2246164e045a51ecd77f9f26680ednd initdir=$TESTDIR/root
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # create the basic filesystem layout
7e68fce3cbd2246164e045a51ecd77f9f26680ednd setup_basic_dirs
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
66e48875fca2df6669dab4f2690ee36c6913c0ffnd # install compiled files
66e48875fca2df6669dab4f2690ee36c6913c0ffnd (cd ../..; make DESTDIR=$initdir install)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # remove unneeded documentation
7e68fce3cbd2246164e045a51ecd77f9f26680ednd rm -fr $initdir/usr/share/{man,doc,gtk-doc}
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd # install possible missing libraries
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd for i in $initdir/{sbin,bin}/* $initdir/lib/systemd/*; do
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd inst_libs $i
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd done
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd # make a journal directory
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd mkdir -p $initdir/var/log/journal
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd # install some basic config files
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd inst /etc/sysconfig/init
4930be147adf9e3f6d3ca9313a6524f9bf654b2dnd inst /etc/passwd
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd inst /etc/shadow
cb7bf5cb76f4c0c5817e2cc6bc97276e425cf165nd inst /etc/group
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /etc/shells
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /etc/nsswitch.conf
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /etc/pam.conf
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /etc/securetty
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /etc/os-release
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /etc/localtime
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # we want an empty environment
66e48875fca2df6669dab4f2690ee36c6913c0ffnd > $initdir/etc/environment
66e48875fca2df6669dab4f2690ee36c6913c0ffnd > $initdir/etc/machine-id
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # set the hostname
7e68fce3cbd2246164e045a51ecd77f9f26680ednd echo systemd-testsuite > $initdir/etc/hostname
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd eval $(udevadm info --export --query=env --name=${LOOPDEV}p2)
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cat >$initdir/etc/fstab <<EOF
7e68fce3cbd2246164e045a51ecd77f9f26680edndLABEL=systemd / ext3 rw 0 1
7e68fce3cbd2246164e045a51ecd77f9f26680edndEOF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # setup the testsuite target and the test ending service
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cp $TEST_BASE_DIR/{testsuite.target,end.service} $initdir/etc/systemd/system/
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
66e48875fca2df6669dab4f2690ee36c6913c0ffnd # setup the testsuite service
66e48875fca2df6669dab4f2690ee36c6913c0ffnd cat >$initdir/etc/systemd/system/testsuite.service <<EOF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd[Unit]
7e68fce3cbd2246164e045a51ecd77f9f26680edndDescription=Testsuite service
7e68fce3cbd2246164e045a51ecd77f9f26680edndAfter=multi-user.target
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd[Service]
7e68fce3cbd2246164e045a51ecd77f9f26680edndExecStart=/test-jobs.sh
7e68fce3cbd2246164e045a51ecd77f9f26680edndType=oneshot
7e68fce3cbd2246164e045a51ecd77f9f26680edndEOF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # copy the units used by this test
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cp $TEST_BASE_DIR/{hello.service,sleep.service,hello-after-sleep.target} $initdir/etc/systemd/system
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cp test-jobs.sh $initdir/
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
66e48875fca2df6669dab4f2690ee36c6913c0ffnd mkdir -p $initdir/etc/systemd/system/testsuite.target.wants
66e48875fca2df6669dab4f2690ee36c6913c0ffnd ln -fs ../testsuite.service $initdir/etc/systemd/system/testsuite.target.wants/testsuite.service
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ln -fs ../end.service $initdir/etc/systemd/system/testsuite.target.wants/end.service
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # make the testsuite the default target
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ln -fs testsuite.target $initdir/etc/systemd/system/default.target
7e68fce3cbd2246164e045a51ecd77f9f26680ednd mkdir -p $initdir/etc/rc.d
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cat >$initdir/etc/rc.d/rc.local <<EOF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd#!/bin/bash
7e68fce3cbd2246164e045a51ecd77f9f26680edndexit 0
7e68fce3cbd2246164e045a51ecd77f9f26680edndEOF
7e68fce3cbd2246164e045a51ecd77f9f26680ednd chmod 0755 $initdir/etc/rc.d/rc.local
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # install basic tools needed
7e68fce3cbd2246164e045a51ecd77f9f26680ednd dracut_install sh bash setsid loadkeys setfont \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd login sushell sulogin gzip sleep echo mount umount cryptsetup date
7e68fce3cbd2246164e045a51ecd77f9f26680ednd dracut_install dmsetup modprobe
66e48875fca2df6669dab4f2690ee36c6913c0ffnd
66e48875fca2df6669dab4f2690ee36c6913c0ffnd # install libnss_files for login
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst_libdir_file "libnss_files*"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # install dbus and pam
7e68fce3cbd2246164e045a51ecd77f9f26680ednd find \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /etc/dbus-1 \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /etc/pam.d \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /etc/security \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /lib64/security \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /lib/security -xtype f \
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri | while read file; do
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri inst $file
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri done
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri # install dbus socket and service file
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri inst /usr/lib/systemd/system/dbus.socket
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri inst /usr/lib/systemd/system/dbus.service
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri # install basic keyboard maps and fonts
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri for i in \
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri /usr/lib/kbd/consolefonts/latarcyrheb-sun16* \
9299f6420de1bc9f8cc870dd2ae5ee92f115089cdruggeri /usr/lib/kbd/keymaps/include/* \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd /usr/lib/kbd/keymaps/i386/include/* \
66e48875fca2df6669dab4f2690ee36c6913c0ffnd /usr/lib/kbd/keymaps/i386/qwerty/us.*; do
66e48875fca2df6669dab4f2690ee36c6913c0ffnd [[ -f $i ]] || continue
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst $i
7e68fce3cbd2246164e045a51ecd77f9f26680ednd done
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
a32843995c13450ba9433b733242977cb4970265nd # some basic terminfo files
a32843995c13450ba9433b733242977cb4970265nd for _terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do
7e68fce3cbd2246164e045a51ecd77f9f26680ednd [ -f ${_terminfodir}/l/linux ] && break
a32843995c13450ba9433b733242977cb4970265nd done
a32843995c13450ba9433b733242977cb4970265nd dracut_install -o ${_terminfodir}/l/linux
a32843995c13450ba9433b733242977cb4970265nd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # softlink mtab
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ln -fs /proc/self/mounts $initdir/etc/mtab
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # install any Exec's from the service files
7e68fce3cbd2246164e045a51ecd77f9f26680ednd egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/lib/systemd/system/*.service \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd | while read i; do
7e68fce3cbd2246164e045a51ecd77f9f26680ednd i=${i##Exec*=}; i=${i##-}
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst $i
7e68fce3cbd2246164e045a51ecd77f9f26680ednd done
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # install plymouth, if found... else remove plymouth service files
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # if [ -x /usr/libexec/plymouth/plymouth-populate-initrd ]; then
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # PLYMOUTH_POPULATE_SOURCE_FUNCTIONS="$TEST_BASE_DIR/test-functions" \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # /usr/libexec/plymouth/plymouth-populate-initrd -t $initdir
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # dracut_install plymouth plymouthd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # else
7e68fce3cbd2246164e045a51ecd77f9f26680ednd rm -f $initdir/{usr/lib,etc}/systemd/system/plymouth* $initdir/{usr/lib,etc}/systemd/system/*/plymouth*
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # fi
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # some helper tools for debugging
7e68fce3cbd2246164e045a51ecd77f9f26680ednd [[ $DEBUGTOOLS ]] && dracut_install $DEBUGTOOLS
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # install ld.so.conf* and run ldconfig
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cp -a /etc/ld.so.conf* $initdir/etc
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ldconfig -r "$initdir"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ddebug "Strip binaeries"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd find "$initdir" -perm +111 -type f | xargs strip --strip-unneeded | ddebug
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # copy depmod files
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /lib/modules/$KERNEL_VER/modules.order
7e68fce3cbd2246164e045a51ecd77f9f26680ednd inst /lib/modules/$KERNEL_VER/modules.builtin
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # generate module dependencies
7e68fce3cbd2246164e045a51ecd77f9f26680ednd if [[ -d $initdir/lib/modules/$KERNEL_VER ]] && \
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ! depmod -a -b "$initdir" $KERNEL_VER; then
7e68fce3cbd2246164e045a51ecd77f9f26680ednd dfatal "\"depmod -a $KERNEL_VER\" failed."
7e68fce3cbd2246164e045a51ecd77f9f26680ednd exit 1
7e68fce3cbd2246164e045a51ecd77f9f26680ednd fi
7e68fce3cbd2246164e045a51ecd77f9f26680ednd )
7e68fce3cbd2246164e045a51ecd77f9f26680ednd rm -fr $TESTDIR/nspawn-root
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ddebug "cp -ar $TESTDIR/root $TESTDIR/nspawn-root"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd cp -ar $TESTDIR/root $TESTDIR/nspawn-root
7e68fce3cbd2246164e045a51ecd77f9f26680ednd # we don't mount in the nspawn root
7e68fce3cbd2246164e045a51ecd77f9f26680ednd rm -fr $TESTDIR/nspawn-root/etc/fstab
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680ednd ddebug "umount $TESTDIR/root"
66e48875fca2df6669dab4f2690ee36c6913c0ffnd umount $TESTDIR/root
66e48875fca2df6669dab4f2690ee36c6913c0ffnd}
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
7e68fce3cbd2246164e045a51ecd77f9f26680edndtest_cleanup() {
7e68fce3cbd2246164e045a51ecd77f9f26680ednd umount $TESTDIR/root 2>/dev/null
7e68fce3cbd2246164e045a51ecd77f9f26680ednd [[ $LOOPDEV ]] && losetup -d $LOOPDEV
7e68fce3cbd2246164e045a51ecd77f9f26680ednd return 0
7e68fce3cbd2246164e045a51ecd77f9f26680ednd}
7e68fce3cbd2246164e045a51ecd77f9f26680ednd
66e48875fca2df6669dab4f2690ee36c6913c0ffnd. $TEST_BASE_DIR/test-functions
66e48875fca2df6669dab4f2690ee36c6913c0ffnddo_test "$@"
7e68fce3cbd2246164e045a51ecd77f9f26680ednd