mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 1/5] test: self: printf: log skipped tests
Date: Mon,  7 Feb 2022 09:27:57 +0100	[thread overview]
Message-ID: <20220207082801.1052894-1-a.fatoum@pengutronix.de> (raw)

Report number of skipped tests as well as skip reason.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
v1 -> v2:
  - reword commit message to be more accurate.
---
 test/self/printf.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/test/self/printf.c b/test/self/printf.c
index 52fe6ac0faf9..ec74df32ee4b 100644
--- a/test/self/printf.c
+++ b/test/self/printf.c
@@ -247,8 +247,11 @@ uuid(void)
 	const char uuid[16] = {0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
 			       0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};
 
-	if (!IS_ENABLED(CONFIG_PRINTF_UUID))
+	if (!IS_ENABLED(CONFIG_PRINTF_UUID)) {
+		pr_info("skipping UUID tests: disabled in config\n");
+		skipped_tests += 4;
 		return;
+	}
 
 	test("00010203-0405-0607-0809-0a0b0c0d0e0f", "%pUb", uuid);
 	test("00010203-0405-0607-0809-0A0B0C0D0E0F", "%pUB", uuid);
@@ -265,8 +268,11 @@ errptr(void)
 	/* Check that %pe with a non-ERR_PTR gets treated as ordinary %p. */
 	BUILD_BUG_ON(IS_ERR(PTR));
 
-	if (!IS_ENABLED(CONFIG_ERRNO_MESSAGES))
+	if (!IS_ENABLED(CONFIG_ERRNO_MESSAGES)) {
+		pr_info("skipping errno messages tests: disabled in config\n");
+		skipped_tests += 2;
 		return;
+	}
 	test("(Operation not permitted)", "(%pe)", ERR_PTR(-EPERM));
 	test("Requested probe deferral", "%pe", ERR_PTR(-EPROBE_DEFER));
 }
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


             reply	other threads:[~2022-02-07  8:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  8:27 Ahmad Fatoum [this message]
2022-02-07  8:27 ` [PATCH v2 2/5] test: self: printf: add tests for %*ph prints Ahmad Fatoum
2022-02-07  8:27 ` [PATCH v2 3/5] of: report whether of_diff found differences in return code Ahmad Fatoum
2022-02-07  8:28 ` [PATCH v2 4/5] of: silence of_diff output for negative indents Ahmad Fatoum
2022-02-07  8:28 ` [PATCH v2 5/5] test: self: add device tree manipulation test Ahmad Fatoum
2022-02-07  8:36 ` [PATCH v2 1/5] test: self: printf: log skipped tests Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207082801.1052894-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox