It's proposed[1] that crl and req change exit code making it unreliable for some
commands. Allow tests to ignore exit codes by specifying expected exit code `-1`.
This will also make such tests to always use regexp match mode.
Also, slightly fix the logic of applying regexp. Commentary says test
_parameter_ (`exitStatus`) 1 is used to trigger regexp matching but in fact
actual command exit code (`status`) 1 is used for that. This change did not
cause any test result difference.
Link: https://github.com/openssl/openssl/pull/23773
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
set timestamp "$teststart+[expr $testend-$teststart]"
}
}
- if {$status!=$exitStatus || ($status==1?![regexp --\
+ if {($exitStatus!=-1 && $status!=$exitStatus) ||
+ ($exitStatus!=0?![regexp --\
[rus $expectedResult] $result]:([info exists opts(-time)]?\
![listcompare $result $expectedResult $opts(-time)]:\
[string compare "$result" "$expectedResult"]))} {