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 --- test/common/cmd_ut_common.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/common/cmd_ut_common.c (limited to 'test/common/cmd_ut_common.c') diff --git a/test/common/cmd_ut_common.c b/test/common/cmd_ut_common.c new file mode 100644 index 00000000000..2c0267801b2 --- /dev/null +++ b/test/common/cmd_ut_common.c @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019 Heinrich Schuchardt + * Copyright (c) 2021 Steffen Jaeckel + * + * Unit tests for common functions + */ + +#include +#include +#include +#include +#include + +int do_ut_common(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) +{ + struct unit_test *tests = UNIT_TEST_SUITE_START(common_test); + const int n_ents = UNIT_TEST_SUITE_COUNT(common_test); + + return cmd_ut_category("common", "common_test_", tests, n_ents, argc, + argv); +} -- cgit v1.2.3