Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: unittest: Run overlay apply/revert sequence three times

Run the test for the overlay apply/revert sequence three times, to
test if there are unbalanced of_node_put() calls causing reference
counts to become negative.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/a9fb4eb560c58d11a7f167bc78a137b46e76cf15.1692699743.git.geert+renesas@glider.be
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Geert Uytterhoeven and committed by
Rob Herring
02dfc6ac 26409dd0

+3 -1
+3 -1
drivers/of/unittest.c
··· 3066 3066 static void __init of_unittest_overlay(void) 3067 3067 { 3068 3068 struct device_node *bus_np = NULL; 3069 + unsigned int i; 3069 3070 3070 3071 if (platform_driver_register(&unittest_driver)) { 3071 3072 unittest(0, "could not register unittest driver\n"); ··· 3104 3103 of_unittest_overlay_2(); 3105 3104 of_unittest_overlay_3(); 3106 3105 of_unittest_overlay_4(); 3107 - of_unittest_overlay_5(); 3106 + for (i = 0; i < 3; i++) 3107 + of_unittest_overlay_5(); 3108 3108 of_unittest_overlay_6(); 3109 3109 of_unittest_overlay_8(); 3110 3110