diff options
author | Randall Spangler <rspangler@chromium.org> | 2014-06-05 13:32:11 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-07 01:37:21 +0000 |
commit | b9be53640efdee92b1b42e60adda274563236301 (patch) | |
tree | f8f2f5ef809c7a0d163334f9e2675b016fae3ca4 /tests/test_common.h | |
parent | b64f097891e697eaf3b2794baae934f8b4d82d14 (diff) | |
download | vboot-stabilize-5944.B.tar.gz |
vboot2: Use more specific error codesstabilize-5944.Bstabilize-5943.Bstabilize-5942.Bfactory-samus-5939.B
Error codes reported by the crypto and storage APIs are now very
specific, and tests verify the proper errors are reported.
More specific error codes coming to other files next, but I don't want
this CL to get too long.
This also changes test_common.c so TEST_EQ() reports mismatched values
in both decimal and hex, and adds TEST_SUCC() to test for a successful
return value.
BUG=chromium:370082
BRANCH=none
TEST=make clean && VBOOT2=1 COV=1 make
Change-Id: I255c8e5769284fbc286b9d94631b19677a71cdd0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/202778
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'tests/test_common.h')
-rw-r--r-- | tests/test_common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_common.h b/tests/test_common.h index 4acf5887..9a84f505 100644 --- a/tests/test_common.h +++ b/tests/test_common.h @@ -42,6 +42,10 @@ int TEST_TRUE(int result, const char* testname); * Also update the global gTestSuccess flag if test fails. */ int TEST_FALSE(int result, const char* testname); +/* Return 1 if result is 0 (VB_ERROR_SUCCESS / VB2_SUCCESS), else return 0. + * Also update the global gTestSuccess flag if test fails. */ +int TEST_SUCC(int result, const char* testname); + /* ANSI Color coding sequences. * * Don't use \e as MSC does not recognize it as a valid escape sequence. |