From: Thomas Haller <thaller@redhat.com>
To: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft 2/5] tests: shell: let netdev_chain_0 test indicate SKIP if kernel requires netdev device
Date: Wed, 06 Sep 2023 15:42:54 +0200 [thread overview]
Message-ID: <901548e08cdc6fcff34a436f1ff0871816d87795.camel@redhat.com> (raw)
In-Reply-To: <20230904090640.3015-3-fw@strlen.de>
On Mon, 2023-09-04 at 11:06 +0200, Florian Westphal wrote:
> This test case only works on kernel 6.4+.
> Add feature probe for this and then exit early.
>
> We don't want to indicate a test failure, as this test doesn't apply
> on older kernels.
>
> But we should not indicate sucess either, else we might be fooled
> in case something went wrong during feature probe.
>
> Add a special return value, 123, and let run-tests.sh count this
> as 'SKIPPED'.
>
[...]
> failed=0
> +skipped=0
> taint=0
>
> check_features()
> @@ -270,6 +271,9 @@ do
> msg_warn "[DUMP FAIL] $testfile"
> fi
> fi
> + elif [ "$rc_got" -eq 123 ]; then
> + ((skipped++))
> + msg_info "[SKIPPED] $testfile"
I agree with Phil, I think this should return 77.
Btw, I did a similar patch on
[PATCH nft v5 08/19] tests/shell: interpret an exit code of 77 from scripts as "skipped"
Granted, you send your first version with this patch/idea a few hours
before mine. I just point out the overlap...
> else
> ((failed++))
> if [ "$VERBOSE" == "y" ] ; then
> @@ -294,7 +298,12 @@ echo ""
> kmemleak_found=0
> check_kmemleak_force
>
> -msg_info "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
> +msg_info "results: [OK] $ok [FAILED] $failed [SKIPPED] $skipped
> [TOTAL] $((ok+failed+skipped))"
> +
> +if [ $ok -eq 0 -a $failed -eq 0 ]; then
> + # no test cases were run, indicate a failure
> + failed=1
> +fi
I think this should be dropped.
When I run
./tests/shell/run-tests.sh tests/shell/testcases/maps/typeof_maps_add_delete
on my Fedora38, the test gets skipped. But I think the command should
just give me a success. What would I do about the "failure" anyway?
Thomas
next prev parent reply other threads:[~2023-09-06 13:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 9:06 [PATCH nft 0/5] tests: shell: add and use feature probing Florian Westphal
2023-09-04 9:06 ` [PATCH nft 1/5] tests: add " Florian Westphal
2023-09-05 13:00 ` Phil Sutter
2023-09-05 13:44 ` Florian Westphal
2023-09-05 14:01 ` Phil Sutter
2023-09-05 14:09 ` Florian Westphal
2023-09-05 20:28 ` Phil Sutter
2023-09-06 5:17 ` Thomas Haller
2023-09-06 14:36 ` Thomas Haller
2023-09-04 9:06 ` [PATCH nft 2/5] tests: shell: let netdev_chain_0 test indicate SKIP if kernel requires netdev device Florian Westphal
2023-09-05 13:03 ` Phil Sutter
2023-09-06 13:42 ` Thomas Haller [this message]
2023-09-04 9:06 ` [PATCH nft 3/5] tests: shell: typeof_integer/raw: prefer @nh for payload matching Florian Westphal
2023-09-04 9:06 ` [PATCH nft 4/5] tests: shell: add and use feature probe for map query like a set Florian Westphal
2023-09-06 14:39 ` Thomas Haller
2023-09-04 9:06 ` [PATCH nft 5/5] tests: shell skip inner matching tests if unsupported Florian Westphal
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=901548e08cdc6fcff34a436f1ff0871816d87795.camel@redhat.com \
--to=thaller@redhat.com \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.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).