From 2dd0111adc8a5a03388f557d1ca91295276fbb54 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 30 Jan 2019 07:53:31 +0100 Subject: test: provide unit test for memory functions Memory functions may have architecture specific implementations. These should be tested. Provide unit tests for memset(), memcpy(), memmove(). Provide a 'ut lib' sub-command to execute the tests. Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- test/lib/cmd_ut_lib.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/lib/cmd_ut_lib.c (limited to 'test/lib/cmd_ut_lib.c') diff --git a/test/lib/cmd_ut_lib.c b/test/lib/cmd_ut_lib.c new file mode 100644 index 0000000000..eb90e53914 --- /dev/null +++ b/test/lib/cmd_ut_lib.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019 Heinrich Schuchardt + * + * Unit tests for library functions + */ + +#include +#include +#include +#include +#include + +int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + struct unit_test *tests = ll_entry_start(struct unit_test, lib_test); + const int n_ents = ll_entry_count(struct unit_test, lib_test); + + return cmd_ut_category("lib", tests, n_ents, argc, argv); +} -- cgit v1.2.3