diff options
author | Tom Rini <trini@konsulko.com> | 2020-07-24 08:42:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-24 08:42:06 -0400 |
commit | 7208396bbf1df1c7a85d263b7ff054e6b45d8240 (patch) | |
tree | 41b20866e0a94e34ca76e54a2745ca7a5ba0889b /test | |
parent | 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7 (diff) |
Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm"
This reverts commit 5d3a21df6694ebd66d5c34c9d62a26edc7456fc7, reversing
changes made to 56d37f1c564107e27d873181d838571b7d7860e7.
Unfortunately this is causing CI failures:
https://travis-ci.org/github/trini/u-boot/jobs/711313649
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/dm/Makefile | 1 | ||||
-rw-r--r-- | test/dm/acpi.c | 3 | ||||
-rw-r--r-- | test/dm/core.c | 10 | ||||
-rw-r--r-- | test/dm/devres.c | 1 | ||||
-rw-r--r-- | test/dm/soc.c | 120 | ||||
-rw-r--r-- | test/dm/test-fdt.c | 2 | ||||
-rw-r--r-- | test/dm/virtio.c | 7 | ||||
-rwxr-xr-x | test/run | 2 |
8 files changed, 6 insertions, 140 deletions
diff --git a/test/dm/Makefile b/test/dm/Makefile index 839111791b..b03c96da06 100644 --- a/test/dm/Makefile +++ b/test/dm/Makefile @@ -68,7 +68,6 @@ obj-$(CONFIG_AXI) += axi.o obj-$(CONFIG_MISC) += misc.o obj-$(CONFIG_DM_SERIAL) += serial.o obj-$(CONFIG_CPU) += cpu.o -obj-$(CONFIG_SOC_DEVICE) += soc.o obj-$(CONFIG_SOUND) += sound.o obj-$(CONFIG_TEE) += tee.o obj-$(CONFIG_VIRTIO_SANDBOX) += virtio.o diff --git a/test/dm/acpi.c b/test/dm/acpi.c index bb8550ffb1..b94c4ba4d1 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -190,10 +190,7 @@ DM_TEST(dm_test_acpi_get_table_revision, static int dm_test_acpi_create_dmar(struct unit_test_state *uts) { struct acpi_dmar dmar; - struct udevice *cpu; - ut_assertok(uclass_first_device(UCLASS_CPU, &cpu)); - ut_assertnonnull(cpu); ut_assertok(acpi_create_dmar(&dmar, DMAR_INTR_REMAP)); ut_asserteq(DMAR_INTR_REMAP, dmar.flags); ut_asserteq(32 - 1, dmar.host_address_width); diff --git a/test/dm/core.c b/test/dm/core.c index d20c48443f..6a930ae31a 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -158,7 +158,7 @@ static int dm_test_autobind_uclass_pdata_alloc(struct unit_test_state *uts) for (uclass_find_first_device(UCLASS_TEST, &dev); dev; uclass_find_next_device(&dev)) { - ut_assertnonnull(dev); + ut_assert(dev); uc_pdata = dev_get_uclass_platdata(dev); ut_assert(uc_pdata); @@ -181,7 +181,7 @@ static int dm_test_autobind_uclass_pdata_valid(struct unit_test_state *uts) for (uclass_find_first_device(UCLASS_TEST, &dev); dev; uclass_find_next_device(&dev)) { - ut_assertnonnull(dev); + ut_assert(dev); uc_pdata = dev_get_uclass_platdata(dev); ut_assert(uc_pdata); @@ -747,11 +747,11 @@ static int dm_test_uclass_devices_find(struct unit_test_state *uts) dev; ret = uclass_find_next_device(&dev)) { ut_assert(!ret); - ut_assertnonnull(dev); + ut_assert(dev); } ut_assertok(uclass_find_first_device(UCLASS_TEST_DUMMY, &dev)); - ut_assertnull(dev); + ut_assert(!dev); return 0; } @@ -778,7 +778,7 @@ static int dm_test_uclass_devices_find_by_name(struct unit_test_state *uts) testdev; ret = uclass_find_next_device(&testdev)) { ut_assertok(ret); - ut_assertnonnull(testdev); + ut_assert(testdev); findret = uclass_find_device_by_name(UCLASS_TEST_FDT, testdev->name, diff --git a/test/dm/devres.c b/test/dm/devres.c index 550787495d..b5de0cb191 100644 --- a/test/dm/devres.c +++ b/test/dm/devres.c @@ -153,7 +153,6 @@ static int dm_test_devres_phase(struct unit_test_state *uts) * allocation created in the bind() method. */ ut_assertok(uclass_find_first_device(UCLASS_TEST_DEVRES, &dev)); - ut_assertnonnull(dev); devres_get_stats(dev, &stats); ut_asserteq(1, stats.allocs); ut_asserteq(TEST_DEVRES_SIZE, stats.total_size); diff --git a/test/dm/soc.c b/test/dm/soc.c deleted file mode 100644 index 3ad0f561f2..0000000000 --- a/test/dm/soc.c +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Test for the SOC uclass - * - * (C) Copyright 2020 - Texas Instruments Incorporated - http://www.ti.com/ - * Dave Gerlach <d-gerlach@ti.com> - */ - -#include <common.h> -#include <dm.h> -#include <dm/test.h> -#include <dm/uclass-internal.h> -#include <soc.h> -#include <test/ut.h> - -struct sb_soc_data { - unsigned long param; -}; - -static int dm_test_soc(struct unit_test_state *uts) -{ - struct udevice *dev; - char text[128]; - const struct soc_attr *soc_data; - const struct sb_soc_data *match_data; - - static const struct sb_soc_data soc_sandbox1_sr10_data = { 0x91919191 }; - static const struct sb_soc_data soc_sandbox123_data = { 0x84848484 }; - - static const struct soc_attr sb_soc_devices_full[] = { - { - .family = "SANDBOX0xx", - .machine = "SANDBOX012", - .revision = "1.0", - .data = NULL, - }, - { - .family = "SANDBOX1xx", - .machine = "SANDBOX107", - .revision = "1.0", - .data = NULL, - }, - { - .family = "SANDBOX1xx", - .machine = "SANDBOX123", - .revision = "1.0", - .data = &soc_sandbox123_data, - }, - { - .family = "SANDBOX1xx", - .machine = "SANDBOX131", - .revision = "2.0", - .data = NULL, - }, - { /* sentinel */ } - }; - - static const struct soc_attr sb_soc_devices_partial[] = { - { - .family = "SANDBOX0xx", - .revision = "1.0", - .data = NULL, - }, - { - .family = "SANDBOX1xx", - .revision = "1.0", - .data = &soc_sandbox1_sr10_data, - }, - { - .family = "SANDBOX1xx", - .revision = "2.0", - .data = NULL, - }, - { /* sentinel */ } - }; - - static const struct soc_attr sb_soc_devices_nomatch[] = { - { - .family = "SANDBOX0xx", - .revision = "1.0", - .data = NULL, - }, - { - .family = "SANDBOX1xx", - .revision = "2.0", - .data = NULL, - }, - { /* sentinel */ } - }; - - ut_assertok(soc_get(&dev)); - - ut_assertok(soc_get_machine(dev, text, sizeof(text))); - ut_assertok(strcmp(text, "SANDBOX123")); - - ut_assertok(soc_get_family(dev, text, sizeof(text))); - ut_assertok(strcmp(text, "SANDBOX1xx")); - - ut_assertok(soc_get_revision(dev, text, sizeof(text))); - ut_asserteq_str(text, "1.0"); - - soc_data = soc_device_match(sb_soc_devices_full); - ut_assert(soc_data); - - match_data = soc_data->data; - ut_asserteq(match_data->param, 0x84848484); - - soc_data = soc_device_match(sb_soc_devices_partial); - ut_assert(soc_data); - - match_data = soc_data->data; - ut_asserteq(match_data->param, 0x91919191); - - soc_data = soc_device_match(sb_soc_devices_nomatch); - ut_asserteq_ptr(soc_data, NULL); - - return 0; -} - -DM_TEST(dm_test_soc, DM_TESTF_SCAN_FDT); diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index 8ef7c7a88e..51f2547409 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -832,12 +832,10 @@ static int dm_test_fdt_phandle(struct unit_test_state *uts) struct udevice *back, *dev, *dev2; ut_assertok(uclass_find_first_device(UCLASS_PANEL_BACKLIGHT, &back)); - ut_assertnonnull(back); ut_asserteq(-ENOENT, uclass_find_device_by_phandle(UCLASS_REGULATOR, back, "missing", &dev)); ut_assertok(uclass_find_device_by_phandle(UCLASS_REGULATOR, back, "power-supply", &dev)); - ut_assertnonnull(dev); ut_asserteq(0, device_active(dev)); ut_asserteq_str("ldo1", dev->name); ut_assertok(uclass_get_device_by_phandle(UCLASS_REGULATOR, back, diff --git a/test/dm/virtio.c b/test/dm/virtio.c index 4a0c0b23b8..4b317d2ec3 100644 --- a/test/dm/virtio.c +++ b/test/dm/virtio.c @@ -22,11 +22,9 @@ static int dm_test_virtio_base(struct unit_test_state *uts) /* check probe success */ ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus)); - ut_assertnonnull(bus); /* check the child virtio-blk device is bound */ ut_assertok(device_find_first_child(bus, &dev)); - ut_assertnonnull(dev); ut_assertok(strcmp(dev->name, "virtio-blk#0")); /* check driver status */ @@ -51,18 +49,15 @@ static int dm_test_virtio_all_ops(struct unit_test_state *uts) /* check probe success */ ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus)); - ut_assertnonnull(bus); /* check the child virtio-blk device is bound */ ut_assertok(device_find_first_child(bus, &dev)); - ut_assertnonnull(dev); /* * fake the virtio device probe by filling in uc_priv->vdev * which is used by virtio_find_vqs/virtio_del_vqs. */ uc_priv = dev_get_uclass_priv(bus); - ut_assertnonnull(uc_priv); uc_priv->vdev = dev; /* test virtio_xxx APIs */ @@ -111,11 +106,9 @@ static int dm_test_virtio_remove(struct unit_test_state *uts) /* check probe success */ ut_assertok(uclass_first_device(UCLASS_VIRTIO, &bus)); - ut_assertnonnull(bus); /* check the child virtio-blk device is bound */ ut_assertok(device_find_first_child(bus, &dev)); - ut_assertnonnull(dev); /* set driver status to VIRTIO_CONFIG_S_DRIVER_OK */ ut_assertok(virtio_set_status(dev, VIRTIO_CONFIG_S_DRIVER_OK)); @@ -48,7 +48,7 @@ export DTC=${DTC_DIR}/dtc TOOLS_DIR=build-sandbox_spl/tools run_test "binman" ./tools/binman/binman --toolpath ${TOOLS_DIR} test -run_test "patman" ./tools/patman/patman test +run_test "patman" ./tools/patman/patman --test run_test "buildman" ./tools/buildman/buildman -t ${skip} run_test "fdt" ./tools/dtoc/test_fdt -t |