summaryrefslogtreecommitdiff
path: root/test/dm/acpi.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-10 21:52:45 +0300
committerTom Rini <trini@konsulko.com>2020-05-19 21:01:47 +0300
commitf91f366bd56ef290b7b1f24a40a8be02c148d6d9 (patch)
treed7c6b993a6fd5f5a4dea7731855baabde6ff16b1 /test/dm/acpi.c
parentd934b43a0294148267c88f22d47aa2ebd77512a5 (diff)
downloadu-boot-f91f366bd56ef290b7b1f24a40a8be02c148d6d9.tar.xz
test: Use ut_asserteq_mem() where possible
Quite a few tests still use ut_assertok(memcmp(...)) and variants. Modify them to use the macro designed for this purpose. Suggested-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'test/dm/acpi.c')
-rw-r--r--test/dm/acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 176d207a55..4c46dd83a6 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -218,20 +218,20 @@ static int dm_test_acpi_setup_base_tables(struct unit_test_state *uts)
rsdp = buf + 16;
ut_asserteq_ptr(rsdp, ctx.rsdp);
- ut_assertok(memcmp(RSDP_SIG, rsdp->signature, sizeof(rsdp->signature)));
+ ut_asserteq_mem(RSDP_SIG, rsdp->signature, sizeof(rsdp->signature));
ut_asserteq(sizeof(*rsdp), rsdp->length);
ut_assertok(table_compute_checksum(rsdp, 20));
ut_assertok(table_compute_checksum(rsdp, sizeof(*rsdp)));
rsdt = PTR_ALIGN((void *)rsdp + sizeof(*rsdp), 16);
ut_asserteq_ptr(rsdt, ctx.rsdt);
- ut_assertok(memcmp("RSDT", rsdt->header.signature, ACPI_NAME_LEN));
+ ut_asserteq_mem("RSDT", rsdt->header.signature, ACPI_NAME_LEN);
ut_asserteq(sizeof(*rsdt), rsdt->header.length);
ut_assertok(table_compute_checksum(rsdt, sizeof(*rsdt)));
xsdt = PTR_ALIGN((void *)rsdt + sizeof(*rsdt), 16);
ut_asserteq_ptr(xsdt, ctx.xsdt);
- ut_assertok(memcmp("XSDT", xsdt->header.signature, ACPI_NAME_LEN));
+ ut_asserteq_mem("XSDT", xsdt->header.signature, ACPI_NAME_LEN);
ut_asserteq(sizeof(*xsdt), xsdt->header.length);
ut_assertok(table_compute_checksum(xsdt, sizeof(*xsdt)));