Skip to content

Commit

Permalink
kernel: Add support for transactional systems to update module
Browse files Browse the repository at this point in the history
  • Loading branch information
czerw committed Oct 18, 2023
1 parent 2626881 commit 15dc357
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use warnings;
use testapi qw(is_serial_terminal :DEFAULT);
use lockapi 'mutex_wait';
use mm_network;
use version_utils qw(is_sle_micro is_microos is_leap is_public_cloud is_sle is_sle12_hdd_in_upgrade is_storage_ng is_jeos package_version_cmp);
use version_utils qw(is_sle_micro is_microos is_leap is_public_cloud is_sle is_sle12_hdd_in_upgrade is_storage_ng is_jeos package_version_cmp is_transactional);
use Utils::Architectures;
use Utils::Systemd qw(systemctl disable_and_stop_service);
use Utils::Backends;
Expand All @@ -20,6 +20,7 @@ use zypper qw(wait_quit_zypper);
use Storable qw(dclone);
use Getopt::Long qw(GetOptionsFromString);
use File::Basename;
use transactional qw(trup_call trup_install);

our @EXPORT = qw(
generate_results
Expand Down Expand Up @@ -769,8 +770,12 @@ the second run will update the system.
sub fully_patch_system {
# special handle for 11-SP4 s390 install
if (is_sle('=11-SP4') && is_s390x && is_backend_s390x) {
# first run, possible update of packager -- exit code 103
zypper_call('patch --with-interactive -l', exitcode => [0, 102, 103], timeout => 3000);
if (is_transactional) {
trup_call ("-c");
}# else {
# first run, possible update of packager -- exit code 103
zypper_call('patch --with-interactive -l', exitcode => [0, 102, 103], timeout => 3000);
# }
handle_patch_11sp4_zvm();
return;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/kernel/update_kernel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use base 'opensusebasetest';
use testapi;
use serial_terminal 'select_serial_terminal';
use utils;
use version_utils qw(is_sle package_version_cmp);
use version_utils qw(is_sle is_transactional package_version_cmp);
use qam;
use kernel 'remove_kernel_packages';
use klp;
Expand Down Expand Up @@ -388,7 +388,7 @@ sub boot_to_console {
sub run {
my $self = shift;

if (is_ipmi && get_var('LTP_BAREMETAL')) {
if ((is_ipmi && get_var('LTP_BAREMETAL')) || is_transactional) {
# System is already booted after installation, just switch terminal
select_serial_terminal;
} else {
Expand Down

0 comments on commit 15dc357

Please sign in to comment.