aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/acpi.c3
-rw-r--r--test/dm/bus.c5
-rw-r--r--test/dm/core.c10
-rw-r--r--test/dm/cpu.c2
-rw-r--r--test/dm/devres.c1
-rw-r--r--test/dm/fwu_mdata.c1
-rw-r--r--test/dm/remoteproc.c1
-rw-r--r--test/dm/spmi.c1
-rw-r--r--test/dm/test-fdt.c5
-rw-r--r--test/dm/usb.c1
10 files changed, 14 insertions, 16 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 4db2171..7da381f 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -236,7 +236,6 @@ static int dm_test_acpi_fill_header(struct unit_test_state *uts)
hdr.length = 0x11;
hdr.revision = 0x22;
hdr.checksum = 0x33;
- hdr.creator_revision = 0x44;
acpi_fill_header(&hdr, "ABCD");
ut_asserteq_mem("ABCD", hdr.signature, sizeof(hdr.signature));
@@ -248,7 +247,7 @@ static int dm_test_acpi_fill_header(struct unit_test_state *uts)
sizeof(hdr.oem_table_id));
ut_asserteq(OEM_REVISION, hdr.oem_revision);
ut_asserteq_mem(ASLC_ID, hdr.creator_id, sizeof(hdr.creator_id));
- ut_asserteq(0x44, hdr.creator_revision);
+ ut_asserteq(ASL_REVISION, hdr.creator_revision);
return 0;
}
diff --git a/test/dm/bus.c b/test/dm/bus.c
index a338c7f..95326f2 100644
--- a/test/dm/bus.c
+++ b/test/dm/bus.c
@@ -14,6 +14,7 @@
#include <dm/test.h>
#include <dm/uclass-internal.h>
#include <dm/util.h>
+#include <linux/list.h>
#include <test/test.h>
#include <test/ut.h>
@@ -27,14 +28,14 @@ static int dm_test_bus_children(struct unit_test_state *uts)
struct uclass *uc;
ut_assertok(uclass_get(UCLASS_TEST_FDT, &uc));
- ut_asserteq(num_devices, list_count_items(&uc->dev_head));
+ ut_asserteq(num_devices, list_count_nodes(&uc->dev_head));
/* Probe the bus, which should yield 3 more devices */
ut_assertok(uclass_get_device(UCLASS_TEST_BUS, 0, &bus));
num_devices += 3;
ut_assertok(uclass_get(UCLASS_TEST_FDT, &uc));
- ut_asserteq(num_devices, list_count_items(&uc->dev_head));
+ ut_asserteq(num_devices, list_count_nodes(&uc->dev_head));
ut_assert(!dm_check_devices(uts, num_devices));
diff --git a/test/dm/core.c b/test/dm/core.c
index 4741c81..5bc5e8e 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -16,6 +16,7 @@
#include <dm/util.h>
#include <dm/test.h>
#include <dm/uclass-internal.h>
+#include <linux/list.h>
#include <test/test.h>
#include <test/ut.h>
@@ -123,15 +124,15 @@ static int dm_test_autobind(struct unit_test_state *uts)
* device with no children.
*/
ut_assert(uts->root);
- ut_asserteq(1, list_count_items(gd->uclass_root));
- ut_asserteq(0, list_count_items(&gd->dm_root->child_head));
+ ut_asserteq(1, list_count_nodes(gd->uclass_root));
+ ut_asserteq(0, list_count_nodes(&gd->dm_root->child_head));
ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]);
ut_assertok(dm_scan_plat(false));
/* We should have our test class now at least, plus more children */
- ut_assert(1 < list_count_items(gd->uclass_root));
- ut_assert(0 < list_count_items(&gd->dm_root->child_head));
+ ut_assert(1 < list_count_nodes(gd->uclass_root));
+ ut_assert(0 < list_count_nodes(&gd->dm_root->child_head));
/* Our 3 dm_test_infox children should be bound to the test uclass */
ut_asserteq(3, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]);
@@ -1006,7 +1007,6 @@ static int dm_test_uclass_before_ready(struct unit_test_state *uts)
ut_assertok(uclass_get(UCLASS_TEST, &uc));
gd->dm_root = NULL;
- gd->dm_root_f = NULL;
memset(&gd->uclass_root, '\0', sizeof(gd->uclass_root));
ut_asserteq_ptr(NULL, uclass_find(UCLASS_TEST));
diff --git a/test/dm/cpu.c b/test/dm/cpu.c
index acba810..8af2531 100644
--- a/test/dm/cpu.c
+++ b/test/dm/cpu.c
@@ -43,6 +43,8 @@ static int dm_test_cpu(struct unit_test_state *uts)
ut_assertok(cpu_get_vendor(dev, text, sizeof(text)));
ut_assertok(strcmp(text, "Languid Example Garbage Inc."));
+ ut_assertok(cpu_release_core(dev, 0));
+
return 0;
}
diff --git a/test/dm/devres.c b/test/dm/devres.c
index 95a470b..7a3a669 100644
--- a/test/dm/devres.c
+++ b/test/dm/devres.c
@@ -69,7 +69,6 @@ static int dm_test_devres_free(struct unit_test_state *uts)
}
DM_TEST(dm_test_devres_free, UT_TESTF_SCAN_PDATA);
-
/* Test that kzalloc() returns memory that is zeroed */
static int dm_test_devres_kzalloc(struct unit_test_state *uts)
{
diff --git a/test/dm/fwu_mdata.c b/test/dm/fwu_mdata.c
index 0be7f45..6154480 100644
--- a/test/dm/fwu_mdata.c
+++ b/test/dm/fwu_mdata.c
@@ -129,7 +129,6 @@ static int dm_test_fwu_mdata_write(struct unit_test_state *uts)
*/
event_notify_null(EVT_MAIN_LOOP);
-
ut_assertok(uclass_first_device_err(UCLASS_FWU_MDATA, &dev));
ut_assertok(fwu_init());
diff --git a/test/dm/remoteproc.c b/test/dm/remoteproc.c
index ef9e8e5..444c4dc 100644
--- a/test/dm/remoteproc.c
+++ b/test/dm/remoteproc.c
@@ -28,7 +28,6 @@ static int dm_test_remoteproc_base(struct unit_test_state *uts)
/* Ensure we are initialized */
ut_asserteq(true, rproc_is_initialized());
-
/* platform data device 1 */
ut_assertok(rproc_stop(0));
ut_assertok(rproc_reset(0));
diff --git a/test/dm/spmi.c b/test/dm/spmi.c
index e10ae8d..ee444f3 100644
--- a/test/dm/spmi.c
+++ b/test/dm/spmi.c
@@ -70,7 +70,6 @@ static int dm_test_spmi_access(struct unit_test_state *uts)
}
DM_TEST(dm_test_spmi_access, UT_TESTF_SCAN_FDT);
-
/* Test if it's possible to access GPIO that should be in pmic */
static int dm_test_spmi_access_peripheral(struct unit_test_state *uts)
{
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 18c89ee..31effff 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -19,6 +19,7 @@
#include <dm/util.h>
#include <dm/of_access.h>
#include <linux/ioport.h>
+#include <linux/list.h>
#include <test/test.h>
#include <test/ut.h>
@@ -162,7 +163,7 @@ static int dm_test_fdt(struct unit_test_state *uts)
ut_assert(!ret);
/* These are num_devices compatible root-level device tree nodes */
- ut_asserteq(num_devices, list_count_items(&uc->dev_head));
+ ut_asserteq(num_devices, list_count_nodes(&uc->dev_head));
/* Each should have platform data but no private data */
for (i = 0; i < num_devices; i++) {
@@ -217,7 +218,7 @@ static int dm_test_fdt_pre_reloc(struct unit_test_state *uts)
* one with "bootph-all" property (a-test node), and the other
* one whose driver marked with DM_FLAG_PRE_RELOC flag (h-test node).
*/
- ut_asserteq(2, list_count_items(&uc->dev_head));
+ ut_asserteq(2, list_count_nodes(&uc->dev_head));
return 0;
}
diff --git a/test/dm/usb.c b/test/dm/usb.c
index 9a57193..0bbea21 100644
--- a/test/dm/usb.c
+++ b/test/dm/usb.c
@@ -423,7 +423,6 @@ static int dm_test_usb_keyb(struct unit_test_state *uts)
{0x00, 0x00, "\0"}
};
-
state_set_skip_delays(true);
ut_assertok(usb_init());