From a21212b992f18b929c48dac1f148de6ed872ceb3 Mon Sep 17 00:00:00 2001
From: Scott Jackson <scottmo@schedmd.com>
Date: Wed, 28 Apr 2021 14:54:34 -0600
Subject: [PATCH] Testsuite - Improve cancel_job allowing empty jobs list

Bug 10656
---
 testsuite/expect/globals | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testsuite/expect/globals b/testsuite/expect/globals
index 29841d99761..950f1371e72 100755
--- a/testsuite/expect/globals
+++ b/testsuite/expect/globals
@@ -1181,6 +1181,10 @@ proc cancel_job { job_id_list {het_job 0}} {
 		}
 	}
 
+	if {![llength $job_list_clean]} {
+		return $::RETURN_SUCCESS
+	}
+
 	log_debug "Cancelling $job_list_clean"
 	if {[run_command_status "$scancel -Q $job_list_clean"]} {
 		log_warn "scancel command returned error"
-- 
GitLab