summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-04 09:57:33 -0700
committerBin Meng <bmeng.cn@gmail.com>2020-11-06 09:51:31 +0800
commit18434aec1b69d8490cb23ef35b2f39cf1784d1d0 (patch)
tree097c9ba2c28a6b825ecccff390eafd00ffc40795 /test
parent01e3c9d2ecbb532ab98da46ceebe8507b6bceec8 (diff)
acpi: Don't reset the tables with every new generation
At present if SSDT and DSDT code is created, only the latter is retained for examination by the 'acpi items' command. Fix this by only resetting the list when explicitly requested. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/dm/acpi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 1f252a8d45..f5eddac10d 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -477,6 +477,7 @@ static int dm_test_acpi_fill_ssdt(struct unit_test_state *uts)
buf = malloc(BUF_SIZE);
ut_assertnonnull(buf);
+ acpi_reset_items();
ctx.current = buf;
buf[4] = 'z'; /* sentinel */
ut_assertok(acpi_fill_ssdt(&ctx));
@@ -507,6 +508,7 @@ static int dm_test_acpi_inject_dsdt(struct unit_test_state *uts)
buf = malloc(BUF_SIZE);
ut_assertnonnull(buf);
+ acpi_reset_items();
ctx.current = buf;
buf[4] = 'z'; /* sentinel */
ut_assertok(acpi_inject_dsdt(&ctx));
@@ -537,6 +539,7 @@ static int dm_test_acpi_cmd_items(struct unit_test_state *uts)
buf = malloc(BUF_SIZE);
ut_assertnonnull(buf);
+ acpi_reset_items();
ctx.current = buf;
ut_assertok(acpi_fill_ssdt(&ctx));
console_record_reset();
@@ -545,6 +548,7 @@ static int dm_test_acpi_cmd_items(struct unit_test_state *uts)
ut_assert_nextline("dev 'acpi-test2', type 1, size 2");
ut_assert_console_end();
+ acpi_reset_items();
ctx.current = buf;
ut_assertok(acpi_inject_dsdt(&ctx));
console_record_reset();