]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
sg-run-job: Detect improper use of @ iffail with run-ts
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 22 May 2019 16:42:16 +0000 (17:42 +0100)
committerIan Jackson <iwj@xenproject.org>
Wed, 7 Oct 2020 16:07:42 +0000 (17:07 +0100)
Only per-host-ts understands this.  This is a bit of a bear trap, so
arrange to bail rather than putting strange step status values with
`@' at the front in the database...

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
sg-run-job

index a074cd423fbde5b6b1683d971f69c30a1e664715..067b28db73a92d5b209a91e680f8b90e595dcc8e 100755 (executable)
@@ -317,6 +317,9 @@ proc iffail-check {iffail okexpr iffail_status_var} {
     if {![regsub {^!} $iffail {} iffail_status]} {
        if {![uplevel 1 [list expr $okexpr]]} { return 0 }
     }
+    if {[regexp {^@} $iffail]} {
+       error "internal error - @ only valid for iffail with per-host-ts"
+    }
     return 1
 }