diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/compression.c | 1 | ||||
-rw-r--r-- | test/dm/clk.c | 1 | ||||
-rw-r--r-- | test/dm/eth.c | 1 | ||||
-rw-r--r-- | test/dm/test-fdt.c | 16 | ||||
-rw-r--r-- | test/env/hashtable.c | 20 |
5 files changed, 25 insertions, 14 deletions
diff --git a/test/compression.c b/test/compression.c index dc5e94684f..08fef59d0a 100644 --- a/test/compression.c +++ b/test/compression.c @@ -6,6 +6,7 @@ #include <common.h> #include <bootm.h> #include <command.h> +#include <gzip.h> #include <malloc.h> #include <mapmem.h> #include <asm/io.h> diff --git a/test/dm/clk.c b/test/dm/clk.c index f301ecbb45..676ef217f0 100644 --- a/test/dm/clk.c +++ b/test/dm/clk.c @@ -24,6 +24,7 @@ static int dm_test_clk_base(struct unit_test_state *uts) /* Get the same clk port in 2 different ways and compare */ ut_assertok(clk_get_by_index(dev, 1, &clk_method1)); ut_assertok(clk_get_by_index_nodev(dev_ofnode(dev), 1, &clk_method2)); + ut_asserteq(clk_is_match(&clk_method1, &clk_method2), true); ut_asserteq(clk_method1.id, clk_method2.id); return 0; diff --git a/test/dm/eth.c b/test/dm/eth.c index 6e002b8dce..ad5354b4bf 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -8,6 +8,7 @@ #include <common.h> #include <dm.h> +#include <env.h> #include <fdtdec.h> #include <malloc.h> #include <net.h> diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index ad8591639d..1fb8b5c248 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -549,12 +549,14 @@ static int dm_test_fdt_remap_addr_index_flat(struct unit_test_state *uts) { struct udevice *dev; fdt_addr_t addr; + fdt_size_t size; void *paddr; ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev)); - addr = devfdt_get_addr_index(dev, 0); + addr = devfdt_get_addr_size_index(dev, 0, &size); ut_asserteq(0x8000, addr); + ut_asserteq(0x1000, size); paddr = map_physmem(addr, 0, MAP_NOCACHE); ut_assertnonnull(paddr); @@ -569,12 +571,14 @@ static int dm_test_fdt_remap_addr_name_flat(struct unit_test_state *uts) { struct udevice *dev; fdt_addr_t addr; + fdt_size_t size; void *paddr; ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev)); - addr = devfdt_get_addr_name(dev, "sandbox-dummy-0"); + addr = devfdt_get_addr_size_name(dev, "sandbox-dummy-0", &size); ut_asserteq(0x8000, addr); + ut_asserteq(0x1000, size); paddr = map_physmem(addr, 0, MAP_NOCACHE); ut_assertnonnull(paddr); @@ -609,12 +613,14 @@ static int dm_test_fdt_remap_addr_index_live(struct unit_test_state *uts) { struct udevice *dev; fdt_addr_t addr; + fdt_size_t size; void *paddr; ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev)); - addr = dev_read_addr_index(dev, 0); + addr = dev_read_addr_size_index(dev, 0, &size); ut_asserteq(0x8000, addr); + ut_asserteq(0x1000, size); paddr = map_physmem(addr, 0, MAP_NOCACHE); ut_assertnonnull(paddr); @@ -629,12 +635,14 @@ static int dm_test_fdt_remap_addr_name_live(struct unit_test_state *uts) { struct udevice *dev; fdt_addr_t addr; + fdt_size_t size; void *paddr; ut_assertok(uclass_find_device_by_seq(UCLASS_TEST_DUMMY, 0, true, &dev)); - addr = dev_read_addr_name(dev, "sandbox-dummy-0"); + addr = dev_read_addr_size_name(dev, "sandbox-dummy-0", &size); ut_asserteq(0x8000, addr); + ut_asserteq(0x1000, size); paddr = map_physmem(addr, 0, MAP_NOCACHE); ut_assertnonnull(paddr); diff --git a/test/env/hashtable.c b/test/env/hashtable.c index 8c87e65457..5242c4cc3e 100644 --- a/test/env/hashtable.c +++ b/test/env/hashtable.c @@ -18,8 +18,8 @@ static int htab_fill(struct unit_test_state *uts, struct hsearch_data *htab, size_t size) { size_t i; - ENTRY item; - ENTRY *ritem; + struct env_entry item; + struct env_entry *ritem; char key[20]; for (i = 0; i < size; i++) { @@ -28,7 +28,7 @@ static int htab_fill(struct unit_test_state *uts, item.data = key; item.flags = 0; item.key = key; - ut_asserteq(1, hsearch_r(item, ENTER, &ritem, htab, 0)); + ut_asserteq(1, hsearch_r(item, ENV_ENTER, &ritem, htab, 0)); } return 0; @@ -38,8 +38,8 @@ static int htab_check_fill(struct unit_test_state *uts, struct hsearch_data *htab, size_t size) { size_t i; - ENTRY item; - ENTRY *ritem; + struct env_entry item; + struct env_entry *ritem; char key[20]; for (i = 0; i < size; i++) { @@ -48,7 +48,7 @@ static int htab_check_fill(struct unit_test_state *uts, item.flags = 0; item.data = key; item.key = key; - hsearch_r(item, FIND, &ritem, htab, 0); + hsearch_r(item, ENV_FIND, &ritem, htab, 0); ut_assert(ritem); ut_asserteq_str(key, ritem->key); ut_asserteq_str(key, ritem->data); @@ -61,8 +61,8 @@ static int htab_create_delete(struct unit_test_state *uts, struct hsearch_data *htab, size_t iterations) { size_t i; - ENTRY item; - ENTRY *ritem; + struct env_entry item; + struct env_entry *ritem; char key[20]; for (i = 0; i < iterations; i++) { @@ -71,10 +71,10 @@ static int htab_create_delete(struct unit_test_state *uts, item.flags = 0; item.data = key; item.key = key; - hsearch_r(item, ENTER, &ritem, htab, 0); + hsearch_r(item, ENV_ENTER, &ritem, htab, 0); ritem = NULL; - hsearch_r(item, FIND, &ritem, htab, 0); + hsearch_r(item, ENV_FIND, &ritem, htab, 0); ut_assert(ritem); ut_asserteq_str(key, ritem->key); ut_asserteq_str(key, ritem->data); |