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 --- include/test/lib.h | 14 ++++++++++++++ include/test/suites.h | 1 + 2 files changed, 15 insertions(+) create mode 100644 include/test/lib.h (limited to 'include/test') diff --git a/include/test/lib.h b/include/test/lib.h new file mode 100644 index 0000000000..04b6241e54 --- /dev/null +++ b/include/test/lib.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 Heinrich Schuchardt + */ + +#ifndef __TEST_LIB_H__ +#define __TEST_LIB_H__ + +#include + +/* Declare a new library function test */ +#define LIB_TEST(_name, _flags) UNIT_TEST(_name, _flags, lib_test) + +#endif /* __TEST_LIB_H__ */ diff --git a/include/test/suites.h b/include/test/suites.h index 77d863b4a6..01bee09346 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -27,6 +27,7 @@ int do_ut_bloblist(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); int do_ut_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); +int do_ut_lib(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_time(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int do_ut_unicode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); -- cgit