All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/5] test: Add compression tests to pytest
@ 2017-11-25 18:57 Simon Glass
  2017-11-25 18:57 ` [U-Boot] [PATCH 1/5] test: Add a command function for test execution Simon Glass
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Simon Glass @ 2017-11-25 18:57 UTC (permalink / raw)
  To: u-boot

At present the compression tests do not use the unit test framework, nor
are they executed by the 'make tests' command. This series converts these
tests to use the unit test framework, adding a few other minor
improvements along the way.

The overlay tests do not currently run for me, and we lack instructions
on how to run them.

   ./b/sandbox/u-boot -c "ut overlay"

did not work:

   Running 9 overlay tests
   Test: fdt_overlay_add_node_by_path
   Segmentation fault (core dumped)

It would be useful to have instructions for how to run these somewhere,
along with a README for the feature. The tests should run with
'make tests'.


Simon Glass (5):
  test: Add a command function for test execution
  test: overlay: Use cmd_ut_category()
  test: compression: Put test variables in a struct
  test/py: Allow any unit test suite to be found
  test: compression: Convert to unit test framework

 include/test/compression.h    |  17 +++
 include/test/suites.h         |  17 +++
 test/cmd_ut.c                 |  32 +++++
 test/compression.c            | 295 ++++++++++++++++++++++++++----------------
 test/env/cmd_ut_env.c         |  19 +--
 test/overlay/cmd_ut_overlay.c |  21 +--
 test/py/conftest.py           |   2 +-
 7 files changed, 251 insertions(+), 152 deletions(-)
 create mode 100644 include/test/compression.h

-- 
2.15.0.417.g466bffb3ac-goog

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 1/5] test: Add a command function for test execution
  2017-11-25 18:57 [U-Boot] [PATCH 0/5] test: Add compression tests to pytest Simon Glass
@ 2017-11-25 18:57 ` Simon Glass
  2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
  2017-11-25 18:57 ` [U-Boot] [PATCH 2/5] test: overlay: Use cmd_ut_category() Simon Glass
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Simon Glass @ 2017-11-25 18:57 UTC (permalink / raw)
  To: u-boot

The logic to either iterate through a list of tests or pick a named test
is common to at lest two test suits. Move this logic into a new function
and call it from the environment tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/test/suites.h | 16 ++++++++++++++++
 test/cmd_ut.c         | 25 +++++++++++++++++++++++++
 test/env/cmd_ut_env.c | 19 +------------------
 3 files changed, 42 insertions(+), 18 deletions(-)

diff --git a/include/test/suites.h b/include/test/suites.h
index 0e94feb07a7..6b900a8f594 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -8,6 +8,22 @@
 #ifndef __TEST_SUITES_H__
 #define __TEST_SUITES_H__
 
+struct unit_test;
+
+/**
+ * cmd_ut_category() - Run a category of unit tests
+ *
+ * @name:	Category name
+ * @tests:	List of tests to run
+ * @n_ents:	Number of tests in @tests
+ * @argc:	Argument count provided. Must be <= 1. If this is 1 then all
+ *		tests are run, otherwise only the one named @argv[1] is run.
+ * @argv:	Arguments: argv[1] is the test to run (if @argc >= 2)
+ * @return 0 if OK, CMD_RET_FAILURE on failure
+ */
+int cmd_ut_category(const char *name, struct unit_test *tests, int n_ents,
+		    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_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index 14333423a17..d860dd72f0b 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -8,9 +8,34 @@
 #include <common.h>
 #include <command.h>
 #include <test/suites.h>
+#include <test/test.h>
 
 static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
+int cmd_ut_category(const char *name, struct unit_test *tests, int n_ents,
+		    int argc, char * const argv[])
+{
+	struct unit_test_state uts = { .fail_count = 0 };
+	struct unit_test *test;
+
+	if (argc == 1)
+		printf("Running %d %s tests\n", n_ents, name);
+
+	for (test = tests; test < tests + n_ents; test++) {
+		if (argc > 1 && strcmp(argv[1], test->name))
+			continue;
+		printf("Test: %s\n", test->name);
+
+		uts.start = mallinfo();
+
+		test->func(&uts);
+	}
+
+	printf("Failures: %d\n", uts.fail_count);
+
+	return uts.fail_count ? CMD_RET_FAILURE : 0;
+}
+
 static cmd_tbl_t cmd_ut_sub[] = {
 	U_BOOT_CMD_MKENT(all, CONFIG_SYS_MAXARGS, 1, do_ut_all, "", ""),
 #if defined(CONFIG_UT_DM)
diff --git a/test/env/cmd_ut_env.c b/test/env/cmd_ut_env.c
index 893e5e6a6d6..096afa83dde 100644
--- a/test/env/cmd_ut_env.c
+++ b/test/env/cmd_ut_env.c
@@ -15,23 +15,6 @@ int do_ut_env(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	struct unit_test *tests = ll_entry_start(struct unit_test, env_test);
 	const int n_ents = ll_entry_count(struct unit_test, env_test);
-	struct unit_test_state uts = { .fail_count = 0 };
-	struct unit_test *test;
 
-	if (argc == 1)
-		printf("Running %d environment tests\n", n_ents);
-
-	for (test = tests; test < tests + n_ents; test++) {
-		if (argc > 1 && strcmp(argv[1], test->name))
-			continue;
-		printf("Test: %s\n", test->name);
-
-		uts.start = mallinfo();
-
-		test->func(&uts);
-	}
-
-	printf("Failures: %d\n", uts.fail_count);
-
-	return uts.fail_count ? CMD_RET_FAILURE : 0;
+	return cmd_ut_category("environment", tests, n_ents, argc, argv);
 }
-- 
2.15.0.417.g466bffb3ac-goog

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 2/5] test: overlay: Use cmd_ut_category()
  2017-11-25 18:57 [U-Boot] [PATCH 0/5] test: Add compression tests to pytest Simon Glass
  2017-11-25 18:57 ` [U-Boot] [PATCH 1/5] test: Add a command function for test execution Simon Glass
@ 2017-11-25 18:57 ` Simon Glass
  2017-12-04 18:35   ` [U-Boot] [U-Boot,2/5] " Tom Rini
  2017-12-04 18:35   ` Tom Rini
  2017-11-25 18:57 ` [U-Boot] [PATCH 3/5] test: compression: Put test variables in a struct Simon Glass
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Simon Glass @ 2017-11-25 18:57 UTC (permalink / raw)
  To: u-boot

Adjust the code to use the common test-execution function.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/overlay/cmd_ut_overlay.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c
index c730a11f518..6279e6d0c20 100644
--- a/test/overlay/cmd_ut_overlay.c
+++ b/test/overlay/cmd_ut_overlay.c
@@ -14,6 +14,7 @@
 
 #include <test/ut.h>
 #include <test/overlay.h>
+#include <test/suites.h>
 
 /* 4k ought to be enough for anybody */
 #define FDT_COPY_SIZE	(4 * SZ_1K)
@@ -221,7 +222,6 @@ int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 						 overlay_test);
 	const int n_ents = ll_entry_count(struct unit_test, overlay_test);
 	struct unit_test_state *uts;
-	struct unit_test *test;
 	void *fdt_base = &__dtb_test_fdt_base_begin;
 	void *fdt_overlay = &__dtb_test_fdt_overlay_begin;
 	void *fdt_overlay_stacked = &__dtb_test_fdt_overlay_stacked_begin;
@@ -280,24 +280,7 @@ int do_ut_overlay(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	/* Apply the stacked overlay */
 	ut_assertok(fdt_overlay_apply(fdt_base_copy, fdt_overlay_stacked_copy));
 
-	if (argc == 1)
-		printf("Running %d environment tests\n", n_ents);
-
-	for (test = tests; test < tests + n_ents; test++) {
-		if (argc > 1 && strcmp(argv[1], test->name))
-			continue;
-		printf("Test: %s\n", test->name);
-
-		uts->start = mallinfo();
-
-		test->func(uts);
-	}
-
-	printf("Failures: %d\n", uts->fail_count);
-	if (!uts->fail_count)
-		ret = 0;
-	else
-		ret = CMD_RET_FAILURE;
+	ret = cmd_ut_category("overlay", tests, n_ents, argc, argv);
 
 	free(fdt_overlay_stacked_copy);
 err3:
-- 
2.15.0.417.g466bffb3ac-goog

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 3/5] test: compression: Put test variables in a struct
  2017-11-25 18:57 [U-Boot] [PATCH 0/5] test: Add compression tests to pytest Simon Glass
  2017-11-25 18:57 ` [U-Boot] [PATCH 1/5] test: Add a command function for test execution Simon Glass
  2017-11-25 18:57 ` [U-Boot] [PATCH 2/5] test: overlay: Use cmd_ut_category() Simon Glass
@ 2017-11-25 18:57 ` Simon Glass
  2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
  2017-11-25 18:57 ` [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found Simon Glass
  2017-11-25 18:57 ` [U-Boot] [PATCH 5/5] test: compression: Convert to unit test framework Simon Glass
  4 siblings, 1 reply; 13+ messages in thread
From: Simon Glass @ 2017-11-25 18:57 UTC (permalink / raw)
  To: u-boot

At present the test setup is somewhat mixed with the test itself. But if
the test setup fails (which it should not) then the test is actually
invalid. Put all the test buffers and sizes in a struct and separate out
the core code into a function.

This will make it easier to move the code to use the unit test framework.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/compression.c | 128 +++++++++++++++++++++++++++++++----------------------
 1 file changed, 74 insertions(+), 54 deletions(-)

diff --git a/test/compression.c b/test/compression.c
index be4e04e6cc0..82eed846a94 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -288,85 +288,105 @@ static int uncompress_using_lz4(void *in, unsigned long in_size,
 	goto out; \
 }
 
-static int run_test(char *name, mutate_func compress, mutate_func uncompress)
-{
-	ulong orig_size, compressed_size, uncompressed_size;
+struct buf_state {
+	ulong orig_size;
+	ulong compressed_size;
+	ulong uncompressed_size;
 	void *orig_buf;
-	void *compressed_buf = NULL;
-	void *uncompressed_buf = NULL;
-	void *compare_buf = NULL;
+	void *compressed_buf;
+	void *uncompressed_buf;
+	void *compare_buf;
+};
+
+static int run_test_internal(char *name,
+			     mutate_func compress, mutate_func uncompress,
+			     struct buf_state *buf)
+{
 	int ret;
 
-	printf(" testing %s ...\n", name);
-
-	orig_buf = (void *)plain;
-	orig_size = strlen(orig_buf); /* Trailing NULL not included. */
-	errcheck(orig_size > 0);
-
-	compressed_size = uncompressed_size = TEST_BUFFER_SIZE;
-	compressed_buf = malloc(compressed_size);
-	errcheck(compressed_buf != NULL);
-	uncompressed_buf = malloc(uncompressed_size);
-	errcheck(uncompressed_buf != NULL);
-	compare_buf = malloc(uncompressed_size);
-	errcheck(compare_buf != NULL);
-
 	/* Compress works as expected. */
-	printf("\torig_size:%lu\n", orig_size);
-	memset(compressed_buf, 'A', TEST_BUFFER_SIZE);
-	errcheck(compress(orig_buf, orig_size,
-			compressed_buf, compressed_size,
-			&compressed_size) == 0);
-	printf("\tcompressed_size:%lu\n", compressed_size);
-	errcheck(compressed_size > 0);
-	errcheck(compressed_size < orig_size);
-	errcheck(((char *)compressed_buf)[compressed_size-1] != 'A');
-	errcheck(((char *)compressed_buf)[compressed_size] == 'A');
+	printf("\torig_size:%lu\n", buf->orig_size);
+	memset(buf->compressed_buf, 'A', TEST_BUFFER_SIZE);
+	errcheck(compress(buf->orig_buf, buf->orig_size, buf->compressed_buf,
+			  buf->compressed_size, &buf->compressed_size) == 0);
+	printf("\tcompressed_size:%lu\n", buf->compressed_size);
+	errcheck(buf->compressed_size > 0);
+	errcheck(buf->compressed_size < buf->orig_size);
+	errcheck(((char *)buf->compressed_buf)[buf->compressed_size - 1] !=
+			'A');
+	errcheck(((char *)buf->compressed_buf)[buf->compressed_size] == 'A');
 
 	/* Uncompresses with space remaining. */
-	errcheck(uncompress(compressed_buf, compressed_size,
-			  uncompressed_buf, uncompressed_size,
-			  &uncompressed_size) == 0);
-	printf("\tuncompressed_size:%lu\n", uncompressed_size);
-	errcheck(uncompressed_size == orig_size);
-	errcheck(memcmp(orig_buf, uncompressed_buf, orig_size) == 0);
+	errcheck(uncompress(buf->compressed_buf, buf->compressed_size,
+			    buf->uncompressed_buf, buf->uncompressed_size,
+			    &buf->uncompressed_size) == 0);
+	printf("\tuncompressed_size:%lu\n", buf->uncompressed_size);
+	errcheck(buf->uncompressed_size == buf->orig_size);
+	errcheck(memcmp(buf->orig_buf, buf->uncompressed_buf,
+			buf->orig_size) == 0);
 
 	/* Uncompresses with exactly the right size output buffer. */
-	memset(uncompressed_buf, 'A', TEST_BUFFER_SIZE);
-	errcheck(uncompress(compressed_buf, compressed_size,
-			  uncompressed_buf, orig_size,
-			  &uncompressed_size) == 0);
-	errcheck(uncompressed_size == orig_size);
-	errcheck(memcmp(orig_buf, uncompressed_buf, orig_size) == 0);
-	errcheck(((char *)uncompressed_buf)[orig_size] == 'A');
+	memset(buf->uncompressed_buf, 'A', TEST_BUFFER_SIZE);
+	errcheck(uncompress(buf->compressed_buf, buf->compressed_size,
+			    buf->uncompressed_buf, buf->orig_size,
+			    &buf->uncompressed_size) == 0);
+	errcheck(buf->uncompressed_size == buf->orig_size);
+	errcheck(memcmp(buf->orig_buf, buf->uncompressed_buf,
+			buf->orig_size) == 0);
+	errcheck(((char *)buf->uncompressed_buf)[buf->orig_size] == 'A');
 
 	/* Make sure compression does not over-run. */
-	memset(compare_buf, 'A', TEST_BUFFER_SIZE);
-	ret = compress(orig_buf, orig_size,
-		       compare_buf, compressed_size - 1,
+	memset(buf->compare_buf, 'A', TEST_BUFFER_SIZE);
+	ret = compress(buf->orig_buf, buf->orig_size,
+		       buf->compare_buf, buf->compressed_size - 1,
 		       NULL);
-	errcheck(((char *)compare_buf)[compressed_size] == 'A');
+	errcheck(((char *)buf->compare_buf)[buf->compressed_size] == 'A');
 	errcheck(ret != 0);
 	printf("\tcompress does not overrun\n");
 
 	/* Make sure decompression does not over-run. */
-	memset(compare_buf, 'A', TEST_BUFFER_SIZE);
-	ret = uncompress(compressed_buf, compressed_size,
-			 compare_buf, uncompressed_size - 1,
+	memset(buf->compare_buf, 'A', TEST_BUFFER_SIZE);
+	ret = uncompress(buf->compressed_buf, buf->compressed_size,
+			 buf->compare_buf, buf->uncompressed_size - 1,
 			 NULL);
-	errcheck(((char *)compare_buf)[uncompressed_size - 1] == 'A');
+	errcheck(((char *)buf->compare_buf)[buf->uncompressed_size - 1] == 'A');
 	errcheck(ret != 0);
 	printf("\tuncompress does not overrun\n");
 
 	/* Got here, everything is fine. */
 	ret = 0;
 
+out:
+	return ret;
+}
+
+static int run_test(char *name, mutate_func compress, mutate_func uncompress)
+{
+	struct buf_state sbuf, *buf = &sbuf;
+	int ret;
+
+	printf(" testing %s ...\n", name);
+
+	buf->orig_buf = (void *)plain;
+	buf->orig_size = strlen(buf->orig_buf); /* Trailing NUL not included */
+	errcheck(buf->orig_size > 0);
+
+	buf->compressed_size = TEST_BUFFER_SIZE;
+	buf->uncompressed_size = TEST_BUFFER_SIZE;
+	buf->compressed_buf = malloc(buf->compressed_size);
+	errcheck(buf->compressed_buf);
+	buf->uncompressed_buf = malloc(buf->uncompressed_size);
+	errcheck(buf->uncompressed_buf);
+	buf->compare_buf = malloc(buf->uncompressed_size);
+	errcheck(buf->compare_buf);
+
+	ret = run_test_internal(name, compress, uncompress, buf);
 out:
 	printf(" %s: %s\n", name, ret == 0 ? "ok" : "FAILED");
 
-	free(compare_buf);
-	free(uncompressed_buf);
-	free(compressed_buf);
+	free(buf->compare_buf);
+	free(buf->uncompressed_buf);
+	free(buf->compressed_buf);
 
 	return ret;
 }
-- 
2.15.0.417.g466bffb3ac-goog

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found
  2017-11-25 18:57 [U-Boot] [PATCH 0/5] test: Add compression tests to pytest Simon Glass
                   ` (2 preceding siblings ...)
  2017-11-25 18:57 ` [U-Boot] [PATCH 3/5] test: compression: Put test variables in a struct Simon Glass
@ 2017-11-25 18:57 ` Simon Glass
  2017-11-27 18:08   ` Stephen Warren
  2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
  2017-11-25 18:57 ` [U-Boot] [PATCH 5/5] test: compression: Convert to unit test framework Simon Glass
  4 siblings, 2 replies; 13+ messages in thread
From: Simon Glass @ 2017-11-25 18:57 UTC (permalink / raw)
  To: u-boot

The u-boot.sym file is scanned to find unit test suites for execution. At
present it only finds those whose names start with 'dm' or 'env'. This
code is buried in the bowels of the test code so when adding a new suite
it is not easy to discover why it is ignored by the test framework.

There seems to be no need to make this restriction. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/py/conftest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/py/conftest.py b/test/py/conftest.py
index 6e66a48c15f..3fe91e87460 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -200,7 +200,7 @@ def pytest_configure(config):
         import u_boot_console_exec_attach
         console = u_boot_console_exec_attach.ConsoleExecAttach(log, ubconfig)
 
-re_ut_test_list = re.compile(r'_u_boot_list_2_(dm|env)_test_2_\1_test_(.*)\s*$')
+re_ut_test_list = re.compile(r'_u_boot_list_2_(.*)_test_2_\1_test_(.*)\s*$')
 def generate_ut_subtest(metafunc, fixture_name):
     """Provide parametrization for a ut_subtest fixture.
 
-- 
2.15.0.417.g466bffb3ac-goog

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 5/5] test: compression: Convert to unit test framework
  2017-11-25 18:57 [U-Boot] [PATCH 0/5] test: Add compression tests to pytest Simon Glass
                   ` (3 preceding siblings ...)
  2017-11-25 18:57 ` [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found Simon Glass
@ 2017-11-25 18:57 ` Simon Glass
  2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
  4 siblings, 1 reply; 13+ messages in thread
From: Simon Glass @ 2017-11-25 18:57 UTC (permalink / raw)
  To: u-boot

Adjust this test to use the unit test framework. Drop the two existing
commands for running the tests and replace them with a single
'ut compression' command, with sub-commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 include/test/compression.h |  17 +++++
 include/test/suites.h      |   1 +
 test/cmd_ut.c              |   7 ++
 test/compression.c         | 185 ++++++++++++++++++++++++++++-----------------
 4 files changed, 141 insertions(+), 69 deletions(-)
 create mode 100644 include/test/compression.h

diff --git a/include/test/compression.h b/include/test/compression.h
new file mode 100644
index 00000000000..646f117ed81
--- /dev/null
+++ b/include/test/compression.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2017 Google, Inc
+ * Written by Simon Glass <sjg@chromium.org>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#ifndef __TEST_COMPRESSION_H__
+#define __TEST_COMPRESSION_H__
+
+#include <test/test.h>
+
+/* Declare a new compression test */
+#define COMPRESSION_TEST(_name, _flags) \
+		UNIT_TEST(_name, _flags, compression_test)
+
+#endif /* __TEST_ENV_H__ */
diff --git a/include/test/suites.h b/include/test/suites.h
index 6b900a8f594..5f2e519084f 100644
--- a/include/test/suites.h
+++ b/include/test/suites.h
@@ -28,5 +28,6 @@ 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_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_compression(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]);
 
 #endif /* __TEST_SUITES_H__ */
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index d860dd72f0b..6b24f463f33 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -50,6 +50,10 @@ static cmd_tbl_t cmd_ut_sub[] = {
 #ifdef CONFIG_UT_TIME
 	U_BOOT_CMD_MKENT(time, CONFIG_SYS_MAXARGS, 1, do_ut_time, "", ""),
 #endif
+#ifdef CONFIG_SANDBOX
+	U_BOOT_CMD_MKENT(compression, CONFIG_SYS_MAXARGS, 1, do_ut_compression,
+			 "", ""),
+#endif
 };
 
 static int do_ut_all(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -101,6 +105,9 @@ static char ut_help_text[] =
 #endif
 #ifdef CONFIG_UT_TIME
 	"ut time - Very basic test of time functions\n"
+#endif
+#ifdef CONFIG_SANDBOX
+	"ut compression - Test compressors and bootm decompression\n"
 #endif
 	;
 #endif
diff --git a/test/compression.c b/test/compression.c
index 82eed846a94..41fa79bd4c8 100644
--- a/test/compression.c
+++ b/test/compression.c
@@ -4,8 +4,6 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 
-#define DEBUG
-
 #include <common.h>
 #include <bootm.h>
 #include <command.h>
@@ -21,6 +19,9 @@
 #include <lzma/LzmaTools.h>
 
 #include <linux/lzo.h>
+#include <test/compression.h>
+#include <test/suites.h>
+#include <test/ut.h>
 
 static const char plain[] =
 	"I am a highly compressable bit of text.\n"
@@ -120,10 +121,11 @@ static const unsigned long lz4_compressed_size = 276;
 
 #define TEST_BUFFER_SIZE	512
 
-typedef int (*mutate_func)(void *, unsigned long, void *, unsigned long,
-			   unsigned long *);
+typedef int (*mutate_func)(struct unit_test_state *uts, void *, unsigned long,
+			   void *, unsigned long, unsigned long *);
 
-static int compress_using_gzip(void *in, unsigned long in_size,
+static int compress_using_gzip(struct unit_test_state *uts,
+			       void *in, unsigned long in_size,
 			       void *out, unsigned long out_max,
 			       unsigned long *out_size)
 {
@@ -137,7 +139,8 @@ static int compress_using_gzip(void *in, unsigned long in_size,
 	return ret;
 }
 
-static int uncompress_using_gzip(void *in, unsigned long in_size,
+static int uncompress_using_gzip(struct unit_test_state *uts,
+				 void *in, unsigned long in_size,
 				 void *out, unsigned long out_max,
 				 unsigned long *out_size)
 {
@@ -151,13 +154,14 @@ static int uncompress_using_gzip(void *in, unsigned long in_size,
 	return ret;
 }
 
-static int compress_using_bzip2(void *in, unsigned long in_size,
+static int compress_using_bzip2(struct unit_test_state *uts,
+				void *in, unsigned long in_size,
 				void *out, unsigned long out_max,
 				unsigned long *out_size)
 {
 	/* There is no bzip2 compression in u-boot, so fake it. */
-	assert(in_size == strlen(plain));
-	assert(memcmp(plain, in, in_size) == 0);
+	ut_asserteq(in_size, strlen(plain));
+	ut_asserteq(0, memcmp(plain, in, in_size));
 
 	if (bzip2_compressed_size > out_max)
 		return -1;
@@ -169,7 +173,8 @@ static int compress_using_bzip2(void *in, unsigned long in_size,
 	return 0;
 }
 
-static int uncompress_using_bzip2(void *in, unsigned long in_size,
+static int uncompress_using_bzip2(struct unit_test_state *uts,
+				  void *in, unsigned long in_size,
 				  void *out, unsigned long out_max,
 				  unsigned long *out_size)
 {
@@ -184,13 +189,14 @@ static int uncompress_using_bzip2(void *in, unsigned long in_size,
 	return (ret != BZ_OK);
 }
 
-static int compress_using_lzma(void *in, unsigned long in_size,
+static int compress_using_lzma(struct unit_test_state *uts,
+			       void *in, unsigned long in_size,
 			       void *out, unsigned long out_max,
 			       unsigned long *out_size)
 {
 	/* There is no lzma compression in u-boot, so fake it. */
-	assert(in_size == strlen(plain));
-	assert(memcmp(plain, in, in_size) == 0);
+	ut_asserteq(in_size,  strlen(plain));
+	ut_asserteq(0, memcmp(plain, in, in_size));
 
 	if (lzma_compressed_size > out_max)
 		return -1;
@@ -202,7 +208,8 @@ static int compress_using_lzma(void *in, unsigned long in_size,
 	return 0;
 }
 
-static int uncompress_using_lzma(void *in, unsigned long in_size,
+static int uncompress_using_lzma(struct unit_test_state *uts,
+				 void *in, unsigned long in_size,
 				 void *out, unsigned long out_max,
 				 unsigned long *out_size)
 {
@@ -216,13 +223,14 @@ static int uncompress_using_lzma(void *in, unsigned long in_size,
 	return (ret != SZ_OK);
 }
 
-static int compress_using_lzo(void *in, unsigned long in_size,
+static int compress_using_lzo(struct unit_test_state *uts,
+			      void *in, unsigned long in_size,
 			      void *out, unsigned long out_max,
 			      unsigned long *out_size)
 {
 	/* There is no lzo compression in u-boot, so fake it. */
-	assert(in_size == strlen(plain));
-	assert(memcmp(plain, in, in_size) == 0);
+	ut_asserteq(in_size,  strlen(plain));
+	ut_asserteq(0, memcmp(plain, in, in_size));
 
 	if (lzo_compressed_size > out_max)
 		return -1;
@@ -234,7 +242,8 @@ static int compress_using_lzo(void *in, unsigned long in_size,
 	return 0;
 }
 
-static int uncompress_using_lzo(void *in, unsigned long in_size,
+static int uncompress_using_lzo(struct unit_test_state *uts,
+				void *in, unsigned long in_size,
 				void *out, unsigned long out_max,
 				unsigned long *out_size)
 {
@@ -249,13 +258,14 @@ static int uncompress_using_lzo(void *in, unsigned long in_size,
 	return (ret != LZO_E_OK);
 }
 
-static int compress_using_lz4(void *in, unsigned long in_size,
+static int compress_using_lz4(struct unit_test_state *uts,
+			      void *in, unsigned long in_size,
 			      void *out, unsigned long out_max,
 			      unsigned long *out_size)
 {
 	/* There is no lz4 compression in u-boot, so fake it. */
-	assert(in_size == strlen(plain));
-	assert(memcmp(plain, in, in_size) == 0);
+	ut_asserteq(in_size,  strlen(plain));
+	ut_asserteq(0, memcmp(plain, in, in_size));
 
 	if (lz4_compressed_size > out_max)
 		return -1;
@@ -267,7 +277,8 @@ static int compress_using_lz4(void *in, unsigned long in_size,
 	return 0;
 }
 
-static int uncompress_using_lz4(void *in, unsigned long in_size,
+static int uncompress_using_lz4(struct unit_test_state *uts,
+				void *in, unsigned long in_size,
 				void *out, unsigned long out_max,
 				unsigned long *out_size)
 {
@@ -298,7 +309,7 @@ struct buf_state {
 	void *compare_buf;
 };
 
-static int run_test_internal(char *name,
+static int run_test_internal(struct unit_test_state *uts, char *name,
 			     mutate_func compress, mutate_func uncompress,
 			     struct buf_state *buf)
 {
@@ -307,8 +318,9 @@ static int run_test_internal(char *name,
 	/* Compress works as expected. */
 	printf("\torig_size:%lu\n", buf->orig_size);
 	memset(buf->compressed_buf, 'A', TEST_BUFFER_SIZE);
-	errcheck(compress(buf->orig_buf, buf->orig_size, buf->compressed_buf,
-			  buf->compressed_size, &buf->compressed_size) == 0);
+	errcheck(compress(uts, buf->orig_buf, buf->orig_size,
+			  buf->compressed_buf, buf->compressed_size,
+			  &buf->compressed_size) == 0);
 	printf("\tcompressed_size:%lu\n", buf->compressed_size);
 	errcheck(buf->compressed_size > 0);
 	errcheck(buf->compressed_size < buf->orig_size);
@@ -317,7 +329,7 @@ static int run_test_internal(char *name,
 	errcheck(((char *)buf->compressed_buf)[buf->compressed_size] == 'A');
 
 	/* Uncompresses with space remaining. */
-	errcheck(uncompress(buf->compressed_buf, buf->compressed_size,
+	errcheck(uncompress(uts, buf->compressed_buf, buf->compressed_size,
 			    buf->uncompressed_buf, buf->uncompressed_size,
 			    &buf->uncompressed_size) == 0);
 	printf("\tuncompressed_size:%lu\n", buf->uncompressed_size);
@@ -327,7 +339,7 @@ static int run_test_internal(char *name,
 
 	/* Uncompresses with exactly the right size output buffer. */
 	memset(buf->uncompressed_buf, 'A', TEST_BUFFER_SIZE);
-	errcheck(uncompress(buf->compressed_buf, buf->compressed_size,
+	errcheck(uncompress(uts, buf->compressed_buf, buf->compressed_size,
 			    buf->uncompressed_buf, buf->orig_size,
 			    &buf->uncompressed_size) == 0);
 	errcheck(buf->uncompressed_size == buf->orig_size);
@@ -337,7 +349,7 @@ static int run_test_internal(char *name,
 
 	/* Make sure compression does not over-run. */
 	memset(buf->compare_buf, 'A', TEST_BUFFER_SIZE);
-	ret = compress(buf->orig_buf, buf->orig_size,
+	ret = compress(uts, buf->orig_buf, buf->orig_size,
 		       buf->compare_buf, buf->compressed_size - 1,
 		       NULL);
 	errcheck(((char *)buf->compare_buf)[buf->compressed_size] == 'A');
@@ -346,7 +358,7 @@ static int run_test_internal(char *name,
 
 	/* Make sure decompression does not over-run. */
 	memset(buf->compare_buf, 'A', TEST_BUFFER_SIZE);
-	ret = uncompress(buf->compressed_buf, buf->compressed_size,
+	ret = uncompress(uts, buf->compressed_buf, buf->compressed_size,
 			 buf->compare_buf, buf->uncompressed_size - 1,
 			 NULL);
 	errcheck(((char *)buf->compare_buf)[buf->uncompressed_size - 1] == 'A');
@@ -360,7 +372,8 @@ out:
 	return ret;
 }
 
-static int run_test(char *name, mutate_func compress, mutate_func uncompress)
+static int run_test(struct unit_test_state *uts, char *name,
+		    mutate_func compress, mutate_func uncompress)
 {
 	struct buf_state sbuf, *buf = &sbuf;
 	int ret;
@@ -380,7 +393,7 @@ static int run_test(char *name, mutate_func compress, mutate_func uncompress)
 	buf->compare_buf = malloc(buf->uncompressed_size);
 	errcheck(buf->compare_buf);
 
-	ret = run_test_internal(name, compress, uncompress, buf);
+	run_test_internal(uts, name, compress, uncompress, buf);
 out:
 	printf(" %s: %s\n", name, ret == 0 ? "ok" : "FAILED");
 
@@ -391,23 +404,41 @@ out:
 	return ret;
 }
 
-static int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc,
-			     char *const argv[])
+static int compression_test_gzip(struct unit_test_state *uts)
 {
-	int err = 0;
+	return run_test(uts, "gzip", compress_using_gzip,
+			uncompress_using_gzip);
+}
+COMPRESSION_TEST(compression_test_gzip, 0);
 
-	err += run_test("gzip", compress_using_gzip, uncompress_using_gzip);
-	err += run_test("bzip2", compress_using_bzip2, uncompress_using_bzip2);
-	err += run_test("lzma", compress_using_lzma, uncompress_using_lzma);
-	err += run_test("lzo", compress_using_lzo, uncompress_using_lzo);
-	err += run_test("lz4", compress_using_lz4, uncompress_using_lz4);
+static int compression_test_bzip2(struct unit_test_state *uts)
+{
+	return run_test(uts, "bzip2", compress_using_bzip2,
+			uncompress_using_bzip2);
+}
+COMPRESSION_TEST(compression_test_bzip2, 0);
+
+static int compression_test_lzma(struct unit_test_state *uts)
+{
+	return run_test(uts, "lzma", compress_using_lzma,
+			uncompress_using_lzma);
+}
+COMPRESSION_TEST(compression_test_lzma, 0);
 
-	printf("ut_compression %s\n", err == 0 ? "ok" : "FAILED");
+static int compression_test_lzo(struct unit_test_state *uts)
+{
+	return run_test(uts, "lzo", compress_using_lzo, uncompress_using_lzo);
+}
+COMPRESSION_TEST(compression_test_lzo, 0);
 
-	return err;
+static int compression_test_lz4(struct unit_test_state *uts)
+{
+	return run_test(uts, "lz4", compress_using_lz4, uncompress_using_lz4);
 }
+COMPRESSION_TEST(compression_test_lz4, 0);
 
-static int compress_using_none(void *in, unsigned long in_size,
+static int compress_using_none(struct unit_test_state *uts,
+			       void *in, unsigned long in_size,
 			       void *out, unsigned long out_max,
 			       unsigned long *out_size)
 {
@@ -425,7 +456,8 @@ static int compress_using_none(void *in, unsigned long in_size,
  * @compress:	Our function to compress data
  * @return 0 if OK, non-zero on failure
  */
-static int run_bootm_test(int comp_type, mutate_func compress)
+static int run_bootm_test(struct unit_test_state *uts, int comp_type,
+			  mutate_func compress)
 {
 	ulong compress_size = 1024;
 	void *compress_buff;
@@ -438,20 +470,18 @@ static int run_bootm_test(int comp_type, mutate_func compress)
 	printf("Testing: %s\n", genimg_get_comp_name(comp_type));
 	compress_buff = map_sysmem(image_start, 0);
 	unc_len = strlen(plain);
-	compress((void *)plain, unc_len, compress_buff, compress_size,
+	compress(uts, (void *)plain, unc_len, compress_buff, compress_size,
 		 &compress_size);
 	err = bootm_decomp_image(comp_type, load_addr, image_start,
 				 IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
 				 compress_buff, compress_size, unc_len,
 				 &load_end);
-	if (err)
-		return err;
+	ut_assertok(err);
 	err = bootm_decomp_image(comp_type, load_addr, image_start,
 				 IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
 				 compress_buff, compress_size, unc_len - 1,
 				 &load_end);
-	if (!err)
-		return -EINVAL;
+	ut_assert(err);
 
 	/* We can't detect corruption when not decompressing */
 	if (comp_type == IH_COMP_NONE)
@@ -462,35 +492,52 @@ static int run_bootm_test(int comp_type, mutate_func compress)
 				 IH_TYPE_KERNEL, map_sysmem(load_addr, 0),
 				 compress_buff, compress_size, 0x10000,
 				 &load_end);
-	if (!err)
-		return -EINVAL;
+	ut_assert(err);
 
 	return 0;
 }
 
-static int do_ut_image_decomp(cmd_tbl_t *cmdtp, int flag, int argc,
-			      char *const argv[])
+static int compression_test_bootm_gzip(struct unit_test_state *uts)
 {
-	int err = 0;
+	return run_bootm_test(uts, IH_COMP_GZIP, compress_using_gzip);
+}
+COMPRESSION_TEST(compression_test_bootm_gzip, 0);
 
-	err = run_bootm_test(IH_COMP_GZIP, compress_using_gzip);
-	err |= run_bootm_test(IH_COMP_BZIP2, compress_using_bzip2);
-	err |= run_bootm_test(IH_COMP_LZMA, compress_using_lzma);
-	err |= run_bootm_test(IH_COMP_LZO, compress_using_lzo);
-	err |= run_bootm_test(IH_COMP_LZ4, compress_using_lz4);
-	err |= run_bootm_test(IH_COMP_NONE, compress_using_none);
+static int compression_test_bootm_bzip2(struct unit_test_state *uts)
+{
+	return run_bootm_test(uts, IH_COMP_BZIP2, compress_using_bzip2);
+}
+COMPRESSION_TEST(compression_test_bootm_bzip2, 0);
 
-	printf("ut_image_decomp %s\n", err == 0 ? "ok" : "FAILED");
+static int compression_test_bootm_lzma(struct unit_test_state *uts)
+{
+	return run_bootm_test(uts, IH_COMP_LZMA, compress_using_lzma);
+}
+COMPRESSION_TEST(compression_test_bootm_lzma, 0);
 
-	return 0;
+static int compression_test_bootm_lzo(struct unit_test_state *uts)
+{
+	return run_bootm_test(uts, IH_COMP_LZO, compress_using_lzo);
 }
+COMPRESSION_TEST(compression_test_bootm_lzo, 0);
 
-U_BOOT_CMD(
-	ut_compression,	5,	1,	do_ut_compression,
-	"Basic test of compressors: gzip bzip2 lzma lzo", ""
-);
+static int compression_test_bootm_lz4(struct unit_test_state *uts)
+{
+	return run_bootm_test(uts, IH_COMP_LZ4, compress_using_lz4);
+}
+COMPRESSION_TEST(compression_test_bootm_lz4, 0);
 
-U_BOOT_CMD(
-	ut_image_decomp,	5,	1, do_ut_image_decomp,
-	"Basic test of bootm decompression", ""
-);
+static int compression_test_bootm_none(struct unit_test_state *uts)
+{
+	return run_bootm_test(uts, IH_COMP_NONE, compress_using_none);
+}
+COMPRESSION_TEST(compression_test_bootm_none, 0);
+
+int do_ut_compression(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	struct unit_test *tests = ll_entry_start(struct unit_test,
+						 compression_test);
+	const int n_ents = ll_entry_count(struct unit_test, compression_test);
+
+	return cmd_ut_category("compression", tests, n_ents, argc, argv);
+}
-- 
2.15.0.417.g466bffb3ac-goog

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found
  2017-11-25 18:57 ` [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found Simon Glass
@ 2017-11-27 18:08   ` Stephen Warren
  2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 13+ messages in thread
From: Stephen Warren @ 2017-11-27 18:08 UTC (permalink / raw)
  To: u-boot

On 11/25/2017 11:57 AM, Simon Glass wrote:
> The u-boot.sym file is scanned to find unit test suites for execution. At
> present it only finds those whose names start with 'dm' or 'env'. This
> code is buried in the bowels of the test code so when adding a new suite
> it is not easy to discover why it is ignored by the test framework.
> 
> There seems to be no need to make this restriction. Drop it.

Acked-by: Stephen Warren <swarren@nvidia.com>

> diff --git a/test/py/conftest.py b/test/py/conftest.py

> -re_ut_test_list = re.compile(r'_u_boot_list_2_(dm|env)_test_2_\1_test_(.*)\s*$')
> +re_ut_test_list = re.compile(r'_u_boot_list_2_(.*)_test_2_\1_test_(.*)\s*$')

I think I made this regex restrictive to avoid accidentally matching 
lists (symbols) with "test" in the name that weren't known unit tests. 
Or maybe there were some unit tests that didn't work yet when I wrote 
it? If we're confident that won't happen, this change seems fine. If we 
do have a problem in the future, I guess we could just rename the symbol 
to s/test/unit_test/ or something to make matching more explicit.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [U-Boot, 1/5] test: Add a command function for test execution
  2017-11-25 18:57 ` [U-Boot] [PATCH 1/5] test: Add a command function for test execution Simon Glass
@ 2017-12-04 18:35   ` Tom Rini
  0 siblings, 0 replies; 13+ messages in thread
From: Tom Rini @ 2017-12-04 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, Nov 25, 2017 at 11:57:29AM -0700, Simon Glass wrote:

> The logic to either iterate through a list of tests or pick a named test
> is common to at lest two test suits. Move this logic into a new function
> and call it from the environment tests.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/cef73217/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [U-Boot,2/5] test: overlay: Use cmd_ut_category()
  2017-11-25 18:57 ` [U-Boot] [PATCH 2/5] test: overlay: Use cmd_ut_category() Simon Glass
@ 2017-12-04 18:35   ` Tom Rini
  2017-12-04 18:35   ` Tom Rini
  1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2017-12-04 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, Nov 25, 2017 at 11:57:30AM -0700, Simon Glass wrote:

> Adjust the code to use the common test-execution function.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/4514ddef/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [U-Boot,2/5] test: overlay: Use cmd_ut_category()
  2017-11-25 18:57 ` [U-Boot] [PATCH 2/5] test: overlay: Use cmd_ut_category() Simon Glass
  2017-12-04 18:35   ` [U-Boot] [U-Boot,2/5] " Tom Rini
@ 2017-12-04 18:35   ` Tom Rini
  1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2017-12-04 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, Nov 25, 2017 at 11:57:30AM -0700, Simon Glass wrote:

> Adjust the code to use the common test-execution function.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/6424b31c/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [U-Boot, 3/5] test: compression: Put test variables in a struct
  2017-11-25 18:57 ` [U-Boot] [PATCH 3/5] test: compression: Put test variables in a struct Simon Glass
@ 2017-12-04 18:35   ` Tom Rini
  0 siblings, 0 replies; 13+ messages in thread
From: Tom Rini @ 2017-12-04 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, Nov 25, 2017 at 11:57:31AM -0700, Simon Glass wrote:

> At present the test setup is somewhat mixed with the test itself. But if
> the test setup fails (which it should not) then the test is actually
> invalid. Put all the test buffers and sizes in a struct and separate out
> the core code into a function.
> 
> This will make it easier to move the code to use the unit test framework.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/f395a819/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [U-Boot, 4/5] test/py: Allow any unit test suite to be found
  2017-11-25 18:57 ` [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found Simon Glass
  2017-11-27 18:08   ` Stephen Warren
@ 2017-12-04 18:35   ` Tom Rini
  1 sibling, 0 replies; 13+ messages in thread
From: Tom Rini @ 2017-12-04 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, Nov 25, 2017 at 11:57:32AM -0700, Simon Glass wrote:

> The u-boot.sym file is scanned to find unit test suites for execution. At
> present it only finds those whose names start with 'dm' or 'env'. This
> code is buried in the bowels of the test code so when adding a new suite
> it is not easy to discover why it is ignored by the test framework.
> 
> There seems to be no need to make this restriction. Drop it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Acked-by: Stephen Warren <swarren@nvidia.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/bd52ff22/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [U-Boot] [U-Boot, 5/5] test: compression: Convert to unit test framework
  2017-11-25 18:57 ` [U-Boot] [PATCH 5/5] test: compression: Convert to unit test framework Simon Glass
@ 2017-12-04 18:35   ` Tom Rini
  0 siblings, 0 replies; 13+ messages in thread
From: Tom Rini @ 2017-12-04 18:35 UTC (permalink / raw)
  To: u-boot

On Sat, Nov 25, 2017 at 11:57:33AM -0700, Simon Glass wrote:

> Adjust this test to use the unit test framework. Drop the two existing
> commands for running the tests and replace them with a single
> 'ut compression' command, with sub-commands.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171204/b3304bef/attachment.sig>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-12-04 18:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-25 18:57 [U-Boot] [PATCH 0/5] test: Add compression tests to pytest Simon Glass
2017-11-25 18:57 ` [U-Boot] [PATCH 1/5] test: Add a command function for test execution Simon Glass
2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
2017-11-25 18:57 ` [U-Boot] [PATCH 2/5] test: overlay: Use cmd_ut_category() Simon Glass
2017-12-04 18:35   ` [U-Boot] [U-Boot,2/5] " Tom Rini
2017-12-04 18:35   ` Tom Rini
2017-11-25 18:57 ` [U-Boot] [PATCH 3/5] test: compression: Put test variables in a struct Simon Glass
2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
2017-11-25 18:57 ` [U-Boot] [PATCH 4/5] test/py: Allow any unit test suite to be found Simon Glass
2017-11-27 18:08   ` Stephen Warren
2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini
2017-11-25 18:57 ` [U-Boot] [PATCH 5/5] test: compression: Convert to unit test framework Simon Glass
2017-12-04 18:35   ` [U-Boot] [U-Boot, " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.