From 25c8b9f298e46ea6048b5308f7ee207c6461c36a Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Thu, 8 Jul 2021 15:57:40 +0200 Subject: test: add first autoboot unit tests This adds tests for the crypt-based and plain SHA256-based password hashing algorithms in the autoboot flow. Signed-off-by: Steffen Jaeckel Reviewed-by: Simon Glass --- include/test/common.h | 15 +++++++++++++++ include/test/suites.h | 1 + 2 files changed, 16 insertions(+) create mode 100644 include/test/common.h (limited to 'include/test') diff --git a/include/test/common.h b/include/test/common.h new file mode 100644 index 00000000000..81260d06ad6 --- /dev/null +++ b/include/test/common.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 Heinrich Schuchardt + * Copyright (c) 2021 Steffen Jaeckel + */ + +#ifndef __TEST_COMMON_H__ +#define __TEST_COMMON_H__ + +#include + +/* Declare a new common function test */ +#define COMMON_TEST(_name, _flags) UNIT_TEST(_name, _flags, common_test) + +#endif /* __TEST_COMMON_H__ */ diff --git a/include/test/suites.h b/include/test/suites.h index 80b41f188c7..d35cd83a4eb 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -31,6 +31,7 @@ int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, int do_ut_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_bloblist(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ut_common(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); -- cgit v1.2.3