diff --git a/tests/image.bash b/tests/image.bash index 7ec3216..44c3874 100755 --- a/tests/image.bash +++ b/tests/image.bash @@ -9,6 +9,7 @@ imageFile() { mkdir -p tests/{fs,kernel,dtb} mount -o rw -t ext4 "/dev/mapper/${loopPrefix}p2" "tests/fs" mount -o rw -t vfat "/dev/mapper/${loopPrefix}p1" "tests/fs/boot" + sync elif [[ $1 == "umount" ]]; then sync umount tests/fs/boot diff --git a/tests/run.exp b/tests/run.exp index 626e594..b71d65a 100755 --- a/tests/run.exp +++ b/tests/run.exp @@ -63,8 +63,10 @@ expect { exp_continue } "pi@raspberrypi:~$ " { - send "sudo shutdown -h now\r" + send "sync\r" } + expect "pi@raspberrypi:~$ " + send "sudo shutdown -h 5s\r" } exit $retval diff --git a/uninstall.bash b/uninstall.bash index 16eb9f5..1dcc903 100755 --- a/uninstall.bash +++ b/uninstall.bash @@ -13,7 +13,7 @@ if ! [[ -f /usr/local/sbin/zram-config || -f /usr/sbin/zram-config ]]; then fi zram-config "stop" -tar -czvf "${BASEDIR}/logs.tar.gz" -C /usr/local/share/zram-config/log . +tar -czf "${BASEDIR}/logs.tar.gz" -C /usr/local/share/zram-config/log . if [[ $OS == "alpine" ]]; then rc-service zram-config stop rc-update del zram-config boot