Four misc small fixes
cover Four misc small fixes
Thse four small fixes/improvements have been generated as the result of my buster work. They are not really related to buster.
Many more changes will follow...
PATCH 1/4 Executive: Do not print "shared ... marked ready" when not shared
Signed-off-by Ian Jackson <[email protected]>
--- Osstest/Executive.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Osstest/Executive.pm +7 -2
@@ -1017,11 +1017,12 @@ sub executive_resource_shared_mark_ready ($$$) { my ($restype, $resname, $sharetype) = @_; # must run outside transaction + my $oldshr; my $what= "resource $restype $resname"; $sharetype .= ' '.get_harness_rev(); db_retry($dbh_tests, [qw(resources)], sub { - my $oldshr= resource_check_allocated_core($restype, $resname); + $oldshr= resource_check_allocated_core($restype, $resname); if (defined $oldshr) { die "$what shared $oldshr->{Type} not $sharetype" unless $oldshr->{Type} eq $sharetype;
@@ -1053,7 +1054,11 @@ END }) { logm("post-mark-ready queue daemon prod failed: $@"); } - logm("$restype $resname shared $sharetype marked ready"); + if ($oldshr) { + logm("$restype $resname shared $sharetype marked ready"); + } else { + logm("$restype $resname (not shared, $sharetype) is ready"); + } } # hostalloc_maxwait_starvation
Signature · 1 line
2.20.1
PATCH 2/4 ts-repeat-test: Honour repeat_mult
In reply to Ian JacksonNothing automatic uses repeat_mult but this script should definitely honour it.
Signed-off-by Ian Jackson <[email protected]>
--- ts-repeat-test | 4 ++++ 1 file changed, 4 insertions(+)
ts-repeat-test +4 -0
@@ -51,6 +51,10 @@ my $dumper = new Data::Dumper [\@cmdis], [qw(*cmdis)]; $dumper->Indent(0); print $dumper->Dump,"\n"; +my $times = $r{repeat_mult} || 1; +my $orgreps = $reps; +$reps *= $times; + foreach my $rep (1..$reps) { logm("========== rep $rep =========="); foreach my $cmdi (@cmdis) {
Signature · 1 line
2.20.1
PATCH 3/4 ts-repeat-test: Show total planned repeat count info
In reply to Ian JacksonMessage change only
Signed-off-by Ian Jackson <[email protected]>
--- ts-repeat-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ts-repeat-test +1 -1
@@ -56,7 +56,7 @@ my $orgreps = $reps; $reps *= $times; foreach my $rep (1..$reps) { - logm("========== rep $rep =========="); + logm("========== rep $rep / $reps ($orgreps x $times) =========="); foreach my $cmdi (@cmdis) { my $l = $cmdi->{L}; logm("---------- rep $rep @$l ----------");
Signature · 1 line
2.20.1
PATCH 4/4 TestSupport: honour OSSTEST_PDU_MANUAL override env var
In reply to Ian JacksonThis takes effect on everything that uses selecthost(). The result is that PDU operations are made manual. This can be useful for testing etc.
Signed-off-by Ian Jackson <[email protected]>
--- Osstest/TestSupport.pm | 6 ++++++ 1 file changed, 6 insertions(+)
Osstest/TestSupport.pm +6 -0
@@ -1059,6 +1059,12 @@ sub power_cycle_host_setup ($) { MethObjs => power_cycle_parse_method($ho, $spec), }; } + if ($ENV{OSSTEST_PDU_MANUAL}) { + @approaches = ({ + Name => 'manual-override', + MethObjs => power_cycle_parse_method($ho, 'manual'), + }); + } $ho->{PowerApproaches} = \@approaches; }
Signature · 1 line
2.20.1