diff options
| author | Oleksandr Tymoshenko <gonzo@FreeBSD.org> | 2017-03-10 03:28:43 +0000 |
|---|---|---|
| committer | Oleksandr Tymoshenko <gonzo@FreeBSD.org> | 2017-03-10 03:28:43 +0000 |
| commit | f059bd1ebfc4cf2e96c4639ad7fa6cf3a3198a2f (patch) | |
| tree | 74d52c3db99ba80520d6142e9bc77e2802093021 /tests/path-references.c | |
| parent | b903311b940763cafe4fb3d8ab3da9c135c17b0c (diff) | |
Import dtc 1.4.3vendor/dtc/1.4.3
Notes
svn path=/vendor/dtc/dist/; revision=314985
svn path=/vendor/dtc/1.4.3/; revision=314986; tag=vendor/dtc/1.4.3
Diffstat (limited to 'tests/path-references.c')
| -rw-r--r-- | tests/path-references.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/path-references.c b/tests/path-references.c index 0746b3f7e324..c8d25fb85fdd 100644 --- a/tests/path-references.c +++ b/tests/path-references.c @@ -47,6 +47,20 @@ static void check_ref(const void *fdt, int node, const char *checkpath) node, p, checkpath); } +static void check_rref(const void *fdt) +{ + const char *p; + int len; + + /* Check reference to root node */ + p = fdt_getprop(fdt, 0, "rref", &len); + if (!p) + FAIL("fdt_getprop(0, \"rref\"): %s", fdt_strerror(len)); + if (!streq(p, "/")) + FAIL("'rref' in root node has value \"%s\" instead of \"/\"", + p); +} + int main(int argc, char *argv[]) { void *fdt; @@ -78,5 +92,7 @@ int main(int argc, char *argv[]) if ((!streq(p, "/node1") || !streq(p + strlen("/node1") + 1, "/node2"))) FAIL("multiref has wrong value"); + check_rref(fdt); + PASS(); } |
