blob: 8db1f9857f7dd181b60c68fe8952e77dee19f125 [file] [log] [blame]
Masahiro Yamada04ca8712018-04-27 01:02:02 +09001// SPDX-License-Identifier: GPL-2.0+
2
3#include <common.h>
4#include <dm.h>
5#include <dm/test.h>
6#include <test/ut.h>
7
8static int dm_test_ofnode_compatible(struct unit_test_state *uts)
9{
10 ofnode root_node = ofnode_path("/");
11
12 ut_assert(ofnode_valid(root_node));
13 ut_assert(ofnode_device_is_compatible(root_node, "sandbox"));
14
15 return 0;
16}
17DM_TEST(dm_test_ofnode_compatible, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);