Linux-kselftest Archive mirror
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Felix Huettner <felix.huettner@mail.schwarz>
Cc: Shuah Khan <shuah@kernel.org>, Phil Sutter <phil@nwl.cc>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Florian Westphal <fw@strlen.de>,
	Max Lamprecht <max.lamprecht@mail.schwarz>,
	Luca Czesla <luca.czesla@mail.schwarz>,
	Xin Long <lucien.xin@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Paul Moore <paul@paul-moore.com>,
	Richard Guy Briggs <rgb@redhat.com>,
	Boris Sukholitko <boris.sukholitko@broadcom.com>,
	Valentin Obst <kernel@valentinobst.de>,
	linux-kselftest@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	llvm@lists.linux.dev
Subject: Re: [PATCH 2/2] selftests/netfilter: return a value for several "int" functions
Date: Tue, 7 May 2024 10:05:49 -0700	[thread overview]
Message-ID: <edca87be-d8a7-4c62-b9c1-f9b3f5752595@nvidia.com> (raw)
In-Reply-To: <ZjnoFfkyREHWUPtq@felix.runs.onstackit.cloud>

On 5/7/24 1:36 AM, Felix Huettner wrote:
>  >
>  > As long as we are looking at this, what do you think about
>  > this:
>  >
>  > diff --git a/tools/testing/selftests/netfilter/conntrack_dump_flush.c
>  > b/tools/testing/selftests/netfilter/conntrack_dump_flush.c
>  > index e9df4ae14e16..4a73afad4de4 100644
>  > --- a/tools/testing/selftests/netfilter/conntrack_dump_flush.c
>  > +++ b/tools/testing/selftests/netfilter/conntrack_dump_flush.c
>  > @@ -317,12 +317,12 @@ FIXTURE_SETUP(conntrack_dump_flush)
>  >         self->sock = mnl_socket_open(NETLINK_NETFILTER);
>  >         if (!self->sock) {
>  >                 perror("mnl_socket_open");
>  > -               exit(EXIT_FAILURE);
>  > +               SKIP(exit(EXIT_FAILURE), "mnl_socket_open() failed");
>  >         }
>  >
>  >         if (mnl_socket_bind(self->sock, 0, MNL_SOCKET_AUTOPID) < 0) {
>  >                 perror("mnl_socket_bind");
>  > -               exit(EXIT_FAILURE);
>  > +               SKIP(exit(EXIT_FAILURE), "mnl_socket_bind() failed");
>  >         }
>  >
>  >         ret = conntracK_count_zone(self->sock, TEST_ZONE_ID);
>  >
>  > ...which changes the above output, to:
>  >
>  > $  ./conntrack_dump_flush
>  > TAP version 13
>  > 1..3
>  > # Starting 3 tests from 1 test cases.
>  > #  RUN           conntrack_dump_flush.test_dump_by_zone ...
>  > mnl_socket_open: Protocol not supported
>  > #      SKIP      mnl_socket_open() failed
>  > #            OK  conntrack_dump_flush.test_dump_by_zone
>  > ok 1 conntrack_dump_flush.test_dump_by_zone # SKIP mnl_socket_open() 
> failed
>  > #  RUN           conntrack_dump_flush.test_flush_by_zone ...
>  > mnl_socket_open: Protocol not supported
>  > #      SKIP      mnl_socket_open() failed
>  > #            OK  conntrack_dump_flush.test_flush_by_zone
>  > ok 2 conntrack_dump_flush.test_flush_by_zone # SKIP mnl_socket_open() 
> failed
>  > #  RUN           conntrack_dump_flush.test_flush_by_zone_default ...
>  > mnl_socket_open: Protocol not supported
>  > #      SKIP      mnl_socket_open() failed
>  > #            OK  conntrack_dump_flush.test_flush_by_zone_default
>  > ok 3 conntrack_dump_flush.test_flush_by_zone_default # SKIP
>  > mnl_socket_open() failed
>  > # PASSED: 3 / 3 tests passed.
>  > # Totals: pass:0 fail:0 xfail:0 xpass:0 skip:3 error:0
>  >
>  > ?
> 
> lgtm
> 

OK, I'll send that out, appreciate your looking at it.

thanks,
-- 
John Hubbard
NVIDIA


      parent reply	other threads:[~2024-05-07 17:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-05 21:47 [PATCH 1/2] selftests/netfilter: use socklen_t, not a signed int, for len John Hubbard
2024-05-05 21:47 ` [PATCH 2/2] selftests/netfilter: return a value for several "int" functions John Hubbard
     [not found]   ` <ZjjsGW314qCgpTKs@felix.runs.onstackit.cloud>
2024-05-06 18:29     ` John Hubbard
     [not found]       ` <ZjnoFfkyREHWUPtq@felix.runs.onstackit.cloud>
2024-05-07 17:05         ` John Hubbard [this message]

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=edca87be-d8a7-4c62-b9c1-f9b3f5752595@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=boris.sukholitko@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=felix.huettner@mail.schwarz \
    --cc=fw@strlen.de \
    --cc=kernel@valentinobst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luca.czesla@mail.schwarz \
    --cc=lucien.xin@gmail.com \
    --cc=max.lamprecht@mail.schwarz \
    --cc=pablo@netfilter.org \
    --cc=paul@paul-moore.com \
    --cc=phil@nwl.cc \
    --cc=rgb@redhat.com \
    --cc=shuah@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 read-only IMAP folder(s) and NNTP newsgroup(s).