summaryrefslogtreecommitdiff
path: root/include/efi_selftest.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-04-16 07:59:03 +0200
committerAlexander Graf <agraf@suse.de>2018-04-23 21:34:28 +0200
commitb5cd6878e43f913ae31c80425e410ca975082b4a (patch)
treee9cafebe5e3c7499c072fd7aadd61fb922d62ac6 /include/efi_selftest.h
parentc524997acb3d322e1bbd36c06ad02ef589705e7c (diff)
efi_selftest: do not execute test if setup failed
Executing a test after failed setup may lead to unexpected behavior like an illegal memory access. So after a setup failure we should skip to teardown. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/efi_selftest.h')
-rw-r--r--include/efi_selftest.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 08dd8e43ad..c23bc24bed 100644
--- a/include/efi_selftest.h
+++ b/include/efi_selftest.h
@@ -114,6 +114,7 @@ u16 efi_st_get_key(void);
* @setup: set up the unit test
* @teardown: tear down the unit test
* @execute: execute the unit test
+ * @setup_ok: setup was successful (set at runtime)
* @on_request: test is only executed on request
*/
struct efi_unit_test {
@@ -123,6 +124,7 @@ struct efi_unit_test {
const struct efi_system_table *systable);
int (*execute)(void);
int (*teardown)(void);
+ int setup_ok;
bool on_request;
};