Skip to content

of: overlay/unittest: Miscellaneous fixes and improvements

Geert Uytterhoeven linux-devicetree linux-renesas-soc 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 6 repliesIn review
  2. v113 patches 8 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13of: dynamic: Do not use "%pOF" while holding devtree_lockdrivers/of/dynamic.c+10 -20 replies
2/13of: overlay: Call of_changeset_init() earlydrivers/of/overlay.c+1 -20 replies
3/13of: unittest: Fix overlay type in apply/revert checkdrivers/of/unittest.c+1 -10 replies
4/13of: unittest: Restore indentation in overlay_bad_add_dup_prop testdrivers/of/unittest.c+3 -30 replies
5/13of: unittest: Improve messages and comments in apply/revert checksdrivers/of/unittest.c+6 -40 replies
6/13of: unittest: Merge of_unittest_apply{,_revert}_overlay_check()drivers/of/unittest.c+18 -270 replies
7/13of: unittest: Cleanup partially-applied overlaysdrivers/of/unittest.c+83 -473 replies
8/13of: unittest: Add separators to of_unittest_overlay_high_level()drivers/of/unittest.c+10 -00 replies
9/13of: overlay: unittest: Add test for unresolved symboldrivers/of/unittest-data/Makefile drivers/of/unittest-data/overlay_bad_unresolved.dtso drivers/of/unittest.c+26 -10 replies
10/13of: unittest-data: Convert remaining overlay DTS files to sugar syntaxdrivers/of/unittest-data/overlay_0.dtso drivers/of/unittest-data/overlay_1.dtso drivers/of/unittest-data/overlay_12.dtso +1 more+12 -320 replies
11/13of: unittest-data: Fix whitespace - blank linesdrivers/of/unittest-data/overlay.dtso drivers/of/unittest-data/overlay_11.dtso drivers/of/unittest-data/overlay_15.dtso +16 more+11 -110 replies
12/13of: unittest-data: Fix whitespace - indentationdrivers/of/unittest-data/overlay_bad_add_dup_node.dtso drivers/of/unittest-data/overlay_bad_add_dup_prop.dtso+6 -60 replies
13/13of: unittest-data: Fix whitespace - angular bracketsdrivers/of/unittest-data/overlay.dtso drivers/of/unittest-data/overlay_bad_add_dup_node.dtso drivers/of/unittest-data/overlay_bad_add_dup_prop.dtso +3 more+40 -400 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/13] of: overlay/unittest: Miscellaneous fixes and improvements

Hi all,

This patch series contains miscellaneous fixes and improvements for dynamic DT overlays and the related unit tests.

The first two patches are fixes for a lock-up and a crash. The remaining patches are smaller fixes, enhancements and cleanups for the overlay tests, including one new test.

I ran into the crash when accidentally loading the wrong overlay (using the out-of-tree DT overlay configfs[1]), and removing it afterwards. As this case was not yet covered by the unittests, I added a test. I enhanced the tests to clean up partial state after a failed overlay apply attempt, which triggered the lock-up.

Changes compared to v1[2]:
- Correct fixes tag and update description.
- Merge differently, as requested by Rob.

Thanks for your comments!

[1] https://elinux.org/R-Car/DT-Overlays
[2] https://lore.kernel.org/r/[email protected]

Geert Uytterhoeven (13):
of: dynamic: Do not use "%pOF" while holding devtree_lock
of: overlay: Call of_changeset_init() early
of: unittest: Fix overlay type in apply/revert check
of: unittest: Restore indentation in overlay_bad_add_dup_prop test
of: unittest: Improve messages and comments in apply/revert checks
of: unittest: Merge of_unittest_apply{,_revert}_overlay_check()
of: unittest: Cleanup partially-applied overlays
of: unittest: Add separators to of_unittest_overlay_high_level()
of: overlay: unittest: Add test for unresolved symbol
of: unittest-data: Convert remaining overlay DTS files to sugar syntax
of: unittest-data: Fix whitespace - blank lines
of: unittest-data: Fix whitespace - indentation
of: unittest-data: Fix whitespace - angular brackets

 drivers/of/dynamic.c                          |  12 +-
 drivers/of/overlay.c                          |   3 +-
 drivers/of/unittest-data/Makefile             |   3 +-
 drivers/of/unittest-data/overlay.dtso         |  32 ++-
 drivers/of/unittest-data/overlay_0.dtso       |  11 +-
 drivers/of/unittest-data/overlay_1.dtso       |  11 +-
 drivers/of/unittest-data/overlay_11.dtso      |   1 -
 drivers/of/unittest-data/overlay_12.dtso      |  11 +-
 drivers/of/unittest-data/overlay_13.dtso      |  11 +-
 drivers/of/unittest-data/overlay_15.dtso      |   1 +
 drivers/of/unittest-data/overlay_4.dtso       |   1 -
 .../overlay_bad_add_dup_node.dtso             |   9 +-
 .../overlay_bad_add_dup_prop.dtso             |   9 +-
 .../of/unittest-data/overlay_bad_phandle.dtso |   5 +-
 .../of/unittest-data/overlay_bad_symbol.dtso  |   5 +-
 .../unittest-data/overlay_bad_unresolved.dtso |   7 +
 drivers/of/unittest-data/overlay_common.dtsi  |  36 ++-
 drivers/of/unittest-data/overlay_gpio_01.dtso |   1 +
 .../of/unittest-data/overlay_gpio_02a.dtso    |   1 +
 .../of/unittest-data/overlay_gpio_02b.dtso    |   1 +
 drivers/of/unittest-data/overlay_gpio_03.dtso |   1 +
 .../of/unittest-data/overlay_gpio_04a.dtso    |   1 +
 .../of/unittest-data/overlay_gpio_04b.dtso    |   1 +
 .../of/unittest-data/testcases_common.dtsi    |   1 +
 .../of/unittest-data/tests-interrupts.dtsi    |   1 +
 drivers/of/unittest-data/tests-overlay.dtsi   |   1 -
 drivers/of/unittest-data/tests-phandle.dtsi   |   2 +
 drivers/of/unittest.c                         | 218 +++++++++++-------
 28 files changed, 224 insertions(+), 173 deletions(-)
 create mode 100644 drivers/of/unittest-data/overlay_bad_unresolved.dtso
Signature · 12 lines
2.34.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds