New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix poo#15566 #2992
Fix poo#15566 #2992
Conversation
3df0a80
to
a8df3fe
Compare
tests/qam-kgraft/update_kgraft.pm
Outdated
# warm up system | ||
sleep 15; | ||
|
||
die "Patch isnt valid for this system" if is_patch_needed($patch); | ||
|
||
#die if patch is already installed on the system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed , it duplicates line 123 and comment says 100 and 101 returncode but check is for 101/102
btw |
tests/qam-kgraft/update_kgraft.pm
Outdated
@@ -19,21 +19,27 @@ use strict; | |||
use warnings; | |||
|
|||
sub timemark { | |||
my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time); | |||
return sprintf("%02d%02d%02d.%02d%02d.%02d", $year % 100, $mon + 1, $mday, $hour, $min, $sec); | |||
my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ? it brokes tidy check
tests/qam-kgraft/update_kgraft.pm
Outdated
script_run("kgr status | tee /dev/$serialdev", 0); | ||
my $out = wait_serial([$kgr_ready, $kgr_in_progress], 10); | ||
if ($out =~ $kgr_ready) { | ||
script_run( "kgr status | tee /dev/$serialdev", 0 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
tests/qam-kgraft/update_kgraft.pm
Outdated
return 1; | ||
} | ||
elsif ($out =~ $kgr_in_progress) { | ||
elsif ( $out =~ $kgr_in_progress ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dtto
tests/qam-kgraft/update_kgraft.pm
Outdated
@@ -46,15 +52,18 @@ sub kgr_block { | |||
|
|||
while (1) { | |||
script_run("kgr poke"); | |||
script_run(qq{BLOCK="kgr-\$(kgr blocking)"; echo \$BLOCK > /dev/$serialdev}, 0); | |||
$out = wait_serial([$kgr_block_hwrandom, $kgr_block_other, $kgr_block_free], 30); | |||
script_run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dtto
tests/qam-kgraft/update_kgraft.pm
Outdated
select_console('sut'); | ||
select_console("root-console"); | ||
|
||
capture_state("before"); | ||
script_run(qq{if \$(zypper lr | grep test-kgraft -q);then zypper rr test-kgraft ; fi }); | ||
script_run( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dtto
tests/qam-kgraft/update_kgraft.pm
Outdated
#patch system | ||
zypper_call( | ||
"in -t patch $patch", | ||
exitcode => [0, 102, 103], | ||
exitcode => [ 0, 102, 103 ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dtto , and all changes to the end
I used perltidy provided by leap. Let me clean up and check-in again. |
@fschilling I think your problem is that you are missing a local .perltidyrc from the os-autoinst project. Take a look into the Makefile for os-autoinst-distri-opensuse. There is a |
0947385
to
e234f9d
Compare
"zypper -n info -t patch $patch" in "sub is_patch_needed" in lib/qam.pm will have |
tests/qam-kgraft/update_kgraft.pm
Outdated
# are acceptible for patch-checking the repository containing the | ||
# kgraft-patch to test. | ||
# Stop testing immediately if it is anything else. | ||
if (!zypper_call("patch-check -r test-kgraft", exitcode => [101, 102])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused - your comment describing 100 and 101 , but in zypper_call you enum 101 and 102 . Typo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it was a typo. Now corrected.
@fschilling then will better fix this function to cover this situation than extending test itself .. |
Please be a bit more specific in the git commit subject line |
…led) action os-autoinst#15566: qam-kgraft: testers need to know whether zypper is actually doing something (https://progress.opensuse.org/issues/15566) Stop testing immediately if kgraft-patch is already installed on the SUT.
@okurz changed git commit subject line |
LGTM |
@mimi1vx |
action #15566: qam-kgraft: testers need to know whether zypper is actually
doing something (https://progress.opensuse.org/issues/15566)
Stop testing immediately if kgraft-patch is already installed on the SUT.