mirror of https://gitlab.com/qemu-project/dtc.git
tests: Add stacked overlay tests on fdtoverlay
Add a stacked overlay unit test, piggybacking on fdtoverlay. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
1bb00655d3
commit
36f511fb11
|
@ -791,6 +791,21 @@ fdtoverlay_tests() {
|
||||||
|
|
||||||
# test that the new property is installed
|
# test that the new property is installed
|
||||||
run_fdtoverlay_test foobar "/test-node" "test-str-property" "-ts" ${basedtb} ${targetdtb} ${overlaydtb}
|
run_fdtoverlay_test foobar "/test-node" "test-str-property" "-ts" ${basedtb} ${targetdtb} ${overlaydtb}
|
||||||
|
|
||||||
|
stacked_base=stacked_overlay_base.dts
|
||||||
|
stacked_basedtb=stacked_overlay_base.fdtoverlay.test.dtb
|
||||||
|
stacked_bar=stacked_overlay_bar.dts
|
||||||
|
stacked_bardtb=stacked_overlay_bar.fdtoverlay.test.dtb
|
||||||
|
stacked_baz=stacked_overlay_baz.dts
|
||||||
|
stacked_bazdtb=stacked_overlay_baz.fdtoverlay.test.dtb
|
||||||
|
stacked_targetdtb=stacked_overlay_target.fdtoverlay.test.dtb
|
||||||
|
|
||||||
|
run_dtc_test -@ -I dts -O dtb -o $stacked_basedtb $stacked_base
|
||||||
|
run_dtc_test -@ -I dts -O dtb -o $stacked_bardtb $stacked_bar
|
||||||
|
run_dtc_test -@ -I dts -O dtb -o $stacked_bazdtb $stacked_baz
|
||||||
|
|
||||||
|
# test that baz correctly inserted the property
|
||||||
|
run_fdtoverlay_test baz "/foonode/barnode/baznode" "baz-property" "-ts" ${stacked_basedtb} ${stacked_targetdtb} ${stacked_bardtb} ${stacked_bazdtb}
|
||||||
}
|
}
|
||||||
|
|
||||||
pylibfdt_tests () {
|
pylibfdt_tests () {
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
/ {
|
||||||
|
fragment@1 {
|
||||||
|
target = <&foo>;
|
||||||
|
__overlay__ {
|
||||||
|
overlay-1-property;
|
||||||
|
bar: barnode {
|
||||||
|
bar-property = "bar";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
/dts-v1/;
|
||||||
|
/ {
|
||||||
|
foo: foonode {
|
||||||
|
foo-property = "foo";
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,13 @@
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
/ {
|
||||||
|
fragment@1 {
|
||||||
|
target = <&bar>;
|
||||||
|
__overlay__ {
|
||||||
|
overlay-2-property;
|
||||||
|
baz: baznode {
|
||||||
|
baz-property = "baz";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in New Issue