1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-30 06:51:28 +02:00

test: Handle driver model reinit in test_pre_run()

For driver model tests we want to reinit the data structures so that
everything is in a known state before the test runs. This avoids one test
changing something that breaks a subsequent tests.

Move the call for this into test_pre_run().

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-03-07 17:34:56 -07:00
committed by Tom Rini
parent 47ec3ede4e
commit 72b524cf42
4 changed files with 18 additions and 3 deletions

View File

@@ -15,6 +15,7 @@
* @fail_count: Number of tests that failed
* @start: Store the starting mallinfo when doing leak test
* @priv: A pointer to some other info some suites want to track
* @of_live: true to use livetree if available, false to use flattree
* @of_root: Record of the livetree root node (used for setting up tests)
* @expect_str: Temporary string used to hold expected string value
* @actual_str: Temporary string used to hold actual string value
@@ -24,6 +25,7 @@ struct unit_test_state {
struct mallinfo start;
void *priv;
struct device_node *of_root;
bool of_live;
char expect_str[256];
char actual_str[256];
};