From: "Power, Ciara" <ciara.power@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "Richardson, Bruce" <bruce.richardson@intel.com>
Subject: RE: [PATCH] app/test: don't count skipped tests as executed
Date: Tue, 5 Mar 2024 15:34:12 +0000 [thread overview]
Message-ID: <SN7PR11MB76396124F1866F7F47427AFBE6222@SN7PR11MB7639.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20231113150533.249808-1-bruce.richardson@intel.com>
Hi Bruce,
> -----Original Message-----
> From: Bruce Richardson <bruce.richardson@intel.com>
> Sent: Monday, November 13, 2023 3:06 PM
> To: dev@dpdk.org
> Cc: Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [PATCH] app/test: don't count skipped tests as executed
>
> The logic around skipped tests is a little confusing in the unit test runner.
> * Any explicitly disabled tests are counted as skipped but not
> executed.
> * Any tests that return TEST_SKIPPED are counted as both skipped and
> executed, using the same statistics counters.
>
> This makes the stats very strange and hard to correlate, since the totals don't add
> up. One would expect that SKIPPED + EXECUTED + UNSUPPORTED == TOTAL,
> and that PASSED + FAILED == EXECUTED.
>
> To achieve this, mark any tests returning TEST_SKIPPED, or ENOTSUP as not
> having executed.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> app/test/test.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/app/test/test.c b/app/test/test.c index bfa9ea52e3..7b882a59de
> 100644
> --- a/app/test/test.c
> +++ b/app/test/test.c
> @@ -375,11 +375,13 @@ unit_test_suite_runner(struct unit_test_suite *suite)
>
> if (test_success == TEST_SUCCESS)
> suite->succeeded++;
> - else if (test_success == TEST_SKIPPED)
> + else if (test_success == TEST_SKIPPED) {
> suite->skipped++;
> - else if (test_success == -ENOTSUP)
> + suite->executed--;
> + } else if (test_success == -ENOTSUP) {
> suite->unsupported++;
> - else
> + suite->executed--;
> + } else
> suite->failed++;
> } else if (test_success == -ENOTSUP) {
> suite->unsupported++;
> --
> 2.39.2
Makes sense - probably something I should have spotted way back when reworking some of the test framework for sub-testsuites.
Thanks
Acked-by: Ciara Power <ciara.power@intel.com>
next prev parent reply other threads:[~2024-03-05 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 15:05 Bruce Richardson
2024-03-05 14:36 ` [EXT] " Akhil Goyal
2024-03-05 15:11 ` Bruce Richardson
2024-03-06 21:34 ` Thomas Monjalon
2024-03-05 15:34 ` Power, Ciara [this message]
2024-03-05 18:08 ` Tyler Retzlaff
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=SN7PR11MB76396124F1866F7F47427AFBE6222@SN7PR11MB7639.namprd11.prod.outlook.com \
--to=ciara.power@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).