diff options
author | Frank Rowand <frank.rowand@sony.com> | 2022-05-02 13:17:41 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2022-05-03 11:53:15 -0500 |
commit | 992b0dc5c38a4e79dca17577960c5201275b83f1 (patch) | |
tree | ae80fca086d8ba9942400578c2b240c0639bdf78 /drivers/of/unittest-data/overlay_16.dts | |
parent | 1ac17586c950a2c129393f8a92901a2b357acf24 (diff) |
of: overlay: unittest: add tests for overlay notifiers
Add tests for overlay apply and remove notifiers. Trigger errors
for each of the notifier actions.
These tests will reveal a memory leak problem when a notifier returns
an error for action OF_OVERLAY_POST_APPLY. The pr_err() message is:
OF: ERROR: memory leak, expected refcount 1 instead of 3,
of_node_get()/of_node_put() unbalanced - destroy cset entry: attach
overlay node /testcase-data/overlay-node/test-bus/test-unittest17
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220502181742.1402826-3-frowand.list@gmail.com
Diffstat (limited to 'drivers/of/unittest-data/overlay_16.dts')
-rw-r--r-- | drivers/of/unittest-data/overlay_16.dts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/of/unittest-data/overlay_16.dts b/drivers/of/unittest-data/overlay_16.dts new file mode 100644 index 000000000000..80a46dc02581 --- /dev/null +++ b/drivers/of/unittest-data/overlay_16.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; +/plugin/; + +/* overlay_16 - notify test */ + +&unittest_test_bus { + #address-cells = <1>; + #size-cells = <0>; + + test-unittest16 { + compatible = "unittest"; + reg = <16>; + }; +}; |