1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) 2018 Theobroma Systems Design und Consulting GmbH
13 static int dm_test_bootcount(struct unit_test_state *uts)
18 ut_assertok(uclass_get_device(UCLASS_BOOTCOUNT, 0, &dev));
19 ut_assertok(dm_bootcount_set(dev, 0));
20 ut_assertok(dm_bootcount_get(dev, &val));
22 ut_assertok(dm_bootcount_set(dev, 0xab));
23 ut_assertok(dm_bootcount_get(dev, &val));
24 ut_assert(val == 0xab);
29 DM_TEST(dm_test_bootcount, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);