2020
2121# Ignore unused variable parsed out by tooling scripts as test tags metadata
2222# shellcheck disable=SC2034
23- TESTTYPE=" skip-on-rhel-9 payload bootc rhel58215 gh1559"
23+ TESTTYPE=" skip-on-rhel-9 payload bootc gh1559"
2424
2525. ${KSTESTDIR} /functions.sh
2626
@@ -45,16 +45,29 @@ copy_interesting_files_from_system() {
4545 # The location of aforementioned files is different in an ostree system
4646
4747 # Find root device - use list-filesystems to find filesystem mounted at /
48+
49+ # First try btrfs root subvolume
4850 root_device=" $( guestfish ${args} <<< "
4951 launch
5052 list-filesystems
5153 " 2> /dev/null | awk -F' [:/]' ' /btrfsvol:.*root/ {print "/" $3 "/" $4}' ) "
54+ path_prefix=" /ostree/deploy/test-stateroot"
55+
56+ if [ -n " ${root_device} " ]; then
57+ path_prefix=" /root$path_prefix "
58+ else
59+ # Fallback to standard root device on XFS
60+ root_device=" $( guestfish ${args} <<< "
61+ launch
62+ list-filesystems
63+ " 2> /dev/null | grep root | awk -F: ' {print $1}' ) "
64+ fi
5265
53- for item in /root/ostree/deploy/test-stateroot /var/roothome/original-ks.cfg \
54- /root/ostree/deploy/test-stateroot /var/roothome/anaconda-ks.cfg \
55- /root/ostree/deploy/test-stateroot /var/roothome/anabot.log \
56- /root/ostree/deploy/test-stateroot /var/log/anaconda/ \
57- /root/ostree/deploy/test-stateroot /var/roothome/RESULT
66+ for item in ${path_prefix} /var/roothome/original-ks.cfg \
67+ ${path_prefix} /var/roothome/anaconda-ks.cfg \
68+ ${path_prefix} /var/roothome/anabot.log \
69+ ${path_prefix} /var/log/anaconda/ \
70+ ${path_prefix} /var/roothome/RESULT
5871 do
5972 guestfish ${args} <<< "
6073 launch
0 commit comments