tf_fuzz: fix sst `check ... except fail` calls
Fix the error code modelling of sst calls with data value checks (`check
...`), and except fail.
Currently, demo/8.test erroneously fails:
----
set sst name snortwaggle data *;
read sst name snortwaggle check "almost certainly not *this*" expect fail;
----
When reading `expect fail`, the sst read call is marked as "should
fail". However, the intended behaviour is for the read to succeed and
the check to fail.
To fix this, this patch adds a template variable, $check_expect, that
can be used to modify the expected value of the check (similar to how
$expect is used for expected values of calls). Using this, separate
pass/fail values can be set for the check as well as the call itself.
Change-Id: Ia55b6f2fef5737d67540e98ac6fc5e7695a8515f
Signed-off-by: Nik Dewally <Nik.Dewally@arm.com>
diff --git a/tf_fuzz/tfz-cpp/utility/data_blocks.hpp b/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
index bee4594..723ee95 100644
--- a/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
+++ b/tf_fuzz/tfz-cpp/utility/data_blocks.hpp
@@ -43,7 +43,7 @@
bool pf_nothing; // true to not generate results-check(s)
bool pf_pass; // if !expect.pf_nothing, then pass is expected
bool pf_fail; // if "expect fail" was specified
- bool pf_specified;
+ bool pf_specified; // if "expect <ERROR_CODE>" was specified
/* if !pf_nothing && !pf_pass, then
true == expected result was specified
false == tf_fuzz must model expected result, and
@@ -185,7 +185,7 @@
bool can_encrypt; // OK for encryption (fail other uses).
bool can_decrypt; // OK for decryption (fail other uses).
bool can_sign; // OK for signing (fail other operations).
- bool can_verify; // OK for verifing a message signature (fail other uses).
+ bool can_verify; // OK for verifying a message signature (fail other uses).
bool derivable; // OK for derive other keys (fail other uses).
bool persistent; // must be deleted at the end of test.
string usage_string;