diff mbox series

[OSSTEST,1/4] Executive: Do not print "shared ... marked ready" when not shared

Message ID 20200514141951.29371-2-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series Four misc small fixes | expand

Commit Message

Ian Jackson May 14, 2020, 2:19 p.m. UTC
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/Executive.pm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index e741f529..c3dc1261 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -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