1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 /*
3 * libfdt - Flat Device Tree manipulation
4 * Testcase for fdt_getprop()
5 * Copyright (C) 2006 David Gibson, IBM Corporation.
6 */
7
8 #include <stdlib.h>
9 #include <stdio.h>
10 #include <string.h>
11 #include <stdint.h>
12
13 #include <libfdt.h>
14
15 #include "tests.h"
16 #include "testdata.h"
17
main(int argc,char * argv[])18 int main(int argc, char *argv[])
19 {
20 void *fdt;
21
22 test_init(argc, argv);
23 fdt = load_blob_arg(argc, argv);
24
25 check_getprop_cell(fdt, 0, "prop-int", TEST_VALUE_1);
26 check_getprop(fdt, 0, "prop-str", strlen(TEST_STRING_1)+1, TEST_STRING_1);
27
28 PASS();
29 }
30