From patchwork Wed Jul 19 15:00:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13319095 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22360C05052 for ; Wed, 19 Jul 2023 15:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231472AbjGSPAa (ORCPT ); Wed, 19 Jul 2023 11:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbjGSPA0 (ORCPT ); Wed, 19 Jul 2023 11:00:26 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC1321722 for ; Wed, 19 Jul 2023 08:00:20 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:51f7:4083:c317:cdf]) by xavier.telenet-ops.be with bizsmtp id P30G2A00J2xuRWb0130G4L; Wed, 19 Jul 2023 17:00:16 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qM8es-001tPh-CQ; Wed, 19 Jul 2023 17:00:16 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qM8f2-001AtO-DY; Wed, 19 Jul 2023 17:00:16 +0200 From: Geert Uytterhoeven To: Rob Herring , Frank Rowand , Pantelis Antoniou Cc: devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 08/13] of: unittest: Add separators to of_unittest_overlay_high_level() Date: Wed, 19 Jul 2023 17:00:08 +0200 Message-Id: <8587a39c7b8a6aad59d1d38f767f57a0bc0a29e0.1689776064.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org It is hard to see the start and end of each individual test in of_unittest_overlay_high_level(). Add visual cues in the form of separator comments, like was done in of_unittest_overlay_notify(). Signed-off-by: Geert Uytterhoeven --- drivers/of/unittest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 86e109cc5a5385ba..4e3d8f72f979918f 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -3608,6 +3608,8 @@ static __init void of_unittest_overlay_high_level(void) /* now do the normal overlay usage test */ + /* --- overlay --- */ + EXPECT_BEGIN(KERN_ERR, "OF: overlay: WARNING: memory leak will occur if overlay removed, property: /testcase-data-2/substation@100/status"); EXPECT_BEGIN(KERN_ERR, @@ -3658,6 +3660,8 @@ static __init void of_unittest_overlay_high_level(void) unittest(ret, "Adding overlay 'overlay' failed\n"); + /* --- overlay_bad_add_dup_node --- */ + EXPECT_BEGIN(KERN_ERR, "OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/controller"); EXPECT_BEGIN(KERN_ERR, @@ -3679,6 +3683,8 @@ static __init void of_unittest_overlay_high_level(void) EXPECT_END(KERN_ERR, "OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/controller"); + /* --- overlay_bad_add_dup_prop --- */ + EXPECT_BEGIN(KERN_ERR, "OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/electric"); EXPECT_BEGIN(KERN_ERR, @@ -3704,9 +3710,13 @@ static __init void of_unittest_overlay_high_level(void) EXPECT_END(KERN_ERR, "OF: overlay: ERROR: multiple fragments add and/or delete node /testcase-data-2/substation@100/motor-1/electric"); + /* --- overlay_bad_phandle --- */ + unittest(overlay_data_apply("overlay_bad_phandle", NULL), "Adding overlay 'overlay_bad_phandle' failed\n"); + /* --- overlay_bad_symbol --- */ + EXPECT_BEGIN(KERN_ERR, "OF: changeset: remove_property failed @/testcase-data-2/substation@100/hvac-medium-2/name"); EXPECT_BEGIN(KERN_ERR,