]> xenbits.xensource.com Git - osstest.git/commitdiff
resource reporting, nfc: Break out report_rogue_task_description
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 28 Aug 2020 15:53:18 +0000 (16:53 +0100)
committerIan Jackson <iwj@xenproject.org>
Tue, 6 Oct 2020 16:42:40 +0000 (17:42 +0100)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Executive.pm
ms-planner

index 5f59c44e236991510696b0ae147507d556c040fd..e3ab1dc33d81ea59d7d11ddb566cdfa7debed525 100644 (file)
@@ -51,6 +51,7 @@ BEGIN {
                       report_run_getinfo report_altcolour
                       report_altchangecolour opendb_tests
                       report_blessingscond report_find_push_age_info
+                     report_rogue_task_description
                      log_stderr_timestamped
                       tcpconnect_queuedaemon plan_search
                       manual_allocation_base_jobinfo
@@ -418,6 +419,19 @@ sub report_blessingscond ($) {
     return $blessingscond;
 }
 
+sub report_rogue_task_description ($) {
+    my ($arow) = @_;
+    # should have the fields from tasks, except taskid which
+    #  caller must print if they want it.
+    # may also have fields from resources (eg subtask)
+    my $info= "rogue task ";
+    $info .= " $arow->{type} $arow->{refkey}";
+    $info .= " ($arow->{comment})" if defined $arow->{comment};
+    $info .= " $arow->{subtask}";
+    $info .= " (user $arow->{username})";
+    return $info;
+}
+
 sub report__find_test ($$$$$$$) {
     my ($blessings, $branches, $tree,
        $revision, $selection, $extracond, $sortlimit) = @_;
index 41f27fa04c184578e6fef19f0549e89cedf89987..4b970730f6133cd7e43387c28e4c910e5d4138a3 100755 (executable)
@@ -321,11 +321,7 @@ END
            $info= "(preparing)";
        } else {
            print DEBUG "rogue $reso $shareix: $arow->{owntaskid}\n";
-           $info= "rogue task";
-           $info .= " $arow->{type} $arow->{refkey}";
-           $info .= " ($arow->{comment})" if defined $arow->{comment};
-           $info .= " $arow->{subtask}";
-           $info .= " (user $arow->{username})";
+           $info= report_rogue_task_description($arow);
        }
        $plan->{Allocations}{$reskey}= {
             Task => $arow->{owntaskid},