Colin Walters 5aa22e0b1f tests: Port to Debian autopkgtest reboot API
See https://github.com/coreos/coreos-assembler/pull/1528

I think we can drop the old cosa reboot APIs after this,
though I've already forgotten where else I might have written
tests using it.
2020-06-19 13:04:22 +00:00

23 lines
565 B
Bash
Executable File

#!/bin/bash
# https://github.com/ostreedev/ostree/issues/1667
set -xeuo pipefail
. ${KOLA_EXT_DATA}/libinsttest.sh
case "${AUTOPKGTEST_REBOOT_MARK:-}" in
"")
require_writable_sysroot
# Hack this off for now
chattr -i /sysroot
cp -a /var /sysroot/myvar
touch /sysroot/myvar/somenewfile
echo '/sysroot/myvar /var none bind 0 0' >> /etc/fstab
/tmp/autopkgtest-reboot "2"
;;
"2")
systemctl status var.mount
test -f /var/somenewfile
;;
*) fatal "Unexpected AUTOPKGTEST_REBOOT_MARK=${AUTOPKGTEST_REBOOT_MARK}" ;;
esac