diff --git a/tests/disk_guided_delete_partial_postinstall.pm b/tests/disk_guided_delete_partial_postinstall.pm index 913a3e2c..2e876369 100644 --- a/tests/disk_guided_delete_partial_postinstall.pm +++ b/tests/disk_guided_delete_partial_postinstall.pm @@ -5,7 +5,7 @@ use testapi; sub run { assert_screen "root_console"; # mount second partition and check that it's intact - validate_script_output 'mount /dev/vda2 /mnt; echo $?', sub { $_ =~ m/0/ }; + assert_script_run 'mount /dev/vda2 /mnt'; validate_script_output 'cat /mnt/testfile', sub { $_ =~ m/Oh, hi Mark/ }; } diff --git a/tests/disk_guided_free_space_postinstall.pm b/tests/disk_guided_free_space_postinstall.pm index 5db54aef..778bf8ef 100644 --- a/tests/disk_guided_free_space_postinstall.pm +++ b/tests/disk_guided_free_space_postinstall.pm @@ -5,7 +5,7 @@ use testapi; sub run { assert_screen "root_console"; # check that first partition is intact - validate_script_output 'mount /dev/vda1 /mnt; echo $?', sub { $_ =~ m/0/ }; + assert_script_run 'mount /dev/vda1 /mnt'; validate_script_output 'cat /mnt/testfile', sub { $_ =~ m/Hello, world!/ }; } diff --git a/tests/disk_guided_multi_postinstall.pm b/tests/disk_guided_multi_postinstall.pm index d2fab440..920aa6bf 100644 --- a/tests/disk_guided_multi_postinstall.pm +++ b/tests/disk_guided_multi_postinstall.pm @@ -5,7 +5,7 @@ use testapi; sub run { assert_screen "root_console"; # check that second disk is intact - validate_script_output 'mount /dev/sdb1 /mnt; echo $?', sub { $_ =~ m/0/ }; + assert_script_run 'mount /dev/sdb1 /mnt'; validate_script_output 'cat /mnt/testfile', sub { $_ =~ m/Hello, world!/ }; } diff --git a/tests/disk_guided_shrink_postinstall.pm b/tests/disk_guided_shrink_postinstall.pm index 4f24755b..28cfa6ff 100644 --- a/tests/disk_guided_shrink_postinstall.pm +++ b/tests/disk_guided_shrink_postinstall.pm @@ -5,7 +5,7 @@ use testapi; sub run { assert_screen "root_console"; # mount first partition and check that it's intact - validate_script_output 'mount /dev/vda1 /mnt; echo $?', sub { $_ =~ m/0/ }; + assert_script_run 'mount /dev/vda1 /mnt'; validate_script_output 'cat /mnt/testfile', sub { $_ =~ m/Hello, world!/ }; } diff --git a/tests/uefi_postinstall.pm b/tests/uefi_postinstall.pm index 70306300..77dda8ef 100644 --- a/tests/uefi_postinstall.pm +++ b/tests/uefi_postinstall.pm @@ -9,7 +9,7 @@ sub run { } assert_screen "root_console"; # this test shows if the system is booted with efi - validate_script_output '[ -d /sys/firmware/efi/ ]; echo $?', sub { $_ =~ m/0/ }; + assert_script_run '[ -d /sys/firmware/efi/ ]'; } sub test_flags { diff --git a/tests/upgrade_preinstall.pm b/tests/upgrade_preinstall.pm index 42ef76f9..ec4b9a3e 100644 --- a/tests/upgrade_preinstall.pm +++ b/tests/upgrade_preinstall.pm @@ -18,7 +18,7 @@ sub run { # upgrader should be installed on up-to-date system - validate_script_output 'dnf -y update; echo $?', sub { $_ =~ m/0/ }, 1800; + assert_script_run 'dnf -y update', 1800; script_run "reboot"; @@ -29,8 +29,8 @@ sub run { } $self->root_console(tty=>3); - my $update_command = 'dnf -y --enablerepo=updates-testing install dnf-plugin-system-upgrade; echo $?'; - validate_script_output $update_command, sub { $_ =~ m/0/ }, 1800; + my $update_command = 'dnf -y --enablerepo=updates-testing install dnf-plugin-system-upgrade'; + assert_script_run $update_command, 1800; }