This function is passed a directory containing the disk images, and not the path to the disk images itself. Use the same code I'm using elsewhere.
Also, btrfs-1.ks needs to shutdown at the end of installation. --- tests/kickstart_tests/btrfs-1.ks | 2 +- tests/kickstart_tests/btrfs-1.sh | 5 +++-- tests/kickstart_tests/btrfs-2.sh | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/kickstart_tests/btrfs-1.ks b/tests/kickstart_tests/btrfs-1.ks index 03eeeae..eb8f45f 100644 --- a/tests/kickstart_tests/btrfs-1.ks +++ b/tests/kickstart_tests/btrfs-1.ks @@ -19,7 +19,7 @@ keyboard us lang en timezone America/New_York rootpw qweqwe -#shutdown +shutdown
%packages @core diff --git a/tests/kickstart_tests/btrfs-1.sh b/tests/kickstart_tests/btrfs-1.sh index dd83fb0..9b0c90a 100755 --- a/tests/kickstart_tests/btrfs-1.sh +++ b/tests/kickstart_tests/btrfs-1.sh @@ -20,12 +20,13 @@ . ${KSTESTDIR}/functions.sh
validate() { - img=$1 + disksdir=$1 + args=$(for d in ${disksdir}/*img; do echo -a ${d}; done)
# There should be a /root/root/RESULT file with results in it. Check # its contents and decide whether the test finally succeeded or # not. - result=$(virt-cat -a ${img} -m /dev/sda2 /root/root/RESULT) + result=$(virt-cat ${args} -m /dev/sda2 /root/root/RESULT) if [[ $? != 0 ]]; then status=1 echo '*** /root/RESULT does not exist in VM image.' diff --git a/tests/kickstart_tests/btrfs-2.sh b/tests/kickstart_tests/btrfs-2.sh index dd83fb0..9b0c90a 100755 --- a/tests/kickstart_tests/btrfs-2.sh +++ b/tests/kickstart_tests/btrfs-2.sh @@ -20,12 +20,13 @@ . ${KSTESTDIR}/functions.sh
validate() { - img=$1 + disksdir=$1 + args=$(for d in ${disksdir}/*img; do echo -a ${d}; done)
# There should be a /root/root/RESULT file with results in it. Check # its contents and decide whether the test finally succeeded or # not. - result=$(virt-cat -a ${img} -m /dev/sda2 /root/root/RESULT) + result=$(virt-cat ${args} -m /dev/sda2 /root/root/RESULT) if [[ $? != 0 ]]; then status=1 echo '*** /root/RESULT does not exist in VM image.'
On Fri, 2015-07-17 at 15:55 -0400, Chris Lumens wrote:
This function is passed a directory containing the disk images, and not the path to the disk images itself. Use the same code I'm using elsewhere.
Also, btrfs-1.ks needs to shutdown at the end of installation.
tests/kickstart_tests/btrfs-1.ks | 2 +- tests/kickstart_tests/btrfs-1.sh | 5 +++-- tests/kickstart_tests/btrfs-2.sh | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/kickstart_tests/btrfs-1.ks b/tests/kickstart_tests/btrfs-1.ks index 03eeeae..eb8f45f 100644 --- a/tests/kickstart_tests/btrfs-1.ks +++ b/tests/kickstart_tests/btrfs-1.ks @@ -19,7 +19,7 @@ keyboard us lang en timezone America/New_York rootpw qweqwe -#shutdown +shutdown
%packages @core diff --git a/tests/kickstart_tests/btrfs-1.sh b/tests/kickstart_tests/btrfs-1.sh index dd83fb0..9b0c90a 100755 --- a/tests/kickstart_tests/btrfs-1.sh +++ b/tests/kickstart_tests/btrfs-1.sh @@ -20,12 +20,13 @@ . ${KSTESTDIR}/functions.sh
validate() {
- img=$1
disksdir=$1
args=$(for d in ${disksdir}/*img; do echo -a ${d}; done)
# There should be a /root/root/RESULT file with results in it. Check # its contents and decide whether the test finally succeeded or # not.
- result=$(virt-cat -a ${img} -m /dev/sda2 /root/root/RESULT)
- result=$(virt-cat ${args} -m /dev/sda2 /root/root/RESULT) if [[ $? != 0 ]]; then status=1 echo '*** /root/RESULT does not exist in VM image.'
diff --git a/tests/kickstart_tests/btrfs-2.sh b/tests/kickstart_tests/btrfs-2.sh index dd83fb0..9b0c90a 100755 --- a/tests/kickstart_tests/btrfs-2.sh +++ b/tests/kickstart_tests/btrfs-2.sh @@ -20,12 +20,13 @@ . ${KSTESTDIR}/functions.sh
validate() {
- img=$1
disksdir=$1
args=$(for d in ${disksdir}/*img; do echo -a ${d}; done)
# There should be a /root/root/RESULT file with results in it. Check # its contents and decide whether the test finally succeeded or # not.
- result=$(virt-cat -a ${img} -m /dev/sda2 /root/root/RESULT)
- result=$(virt-cat ${args} -m /dev/sda2 /root/root/RESULT) if [[ $? != 0 ]]; then status=1 echo '*** /root/RESULT does not exist in VM image.'
ACK.
anaconda-patches@lists.fedorahosted.org