mx6ul_14x14_evk: Avoid overlap of environment over U-Boot proper
[oweals/u-boot.git] / test / dm / cpu.c
index e6dc576ea3c3d9d262a8a0126ebe2f8bb0be998d..46683d884a4e35855f41df4e81c61f80276cb4db 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
 #include <cpu.h>
@@ -26,6 +27,8 @@ static int dm_test_cpu(struct unit_test_state *uts)
                ut_assert(dev->flags & DM_FLAG_ACTIVATED);
 
        ut_assertok(uclass_get_device_by_name(UCLASS_CPU, "cpu-test1", &dev));
+       ut_asserteq_ptr(cpu_get_current_dev(), dev);
+       ut_asserteq(cpu_is_current(dev), 1);
 
        ut_assertok(cpu_get_desc(dev, text, sizeof(text)));
        ut_assertok(strcmp(text, "LEG Inc. SuperMegaUltraTurbo CPU No. 1"));