From: Daniel Borkmann <borkmann@iogearbox.net>
To: Jesper Dangaard Brouer <brouer@redhat.com>, netdev@vger.kernel.org
Cc: fengguang.wu@intel.com, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next] selftests/bpf: make correct use of exit codes in bpf selftests
Date: Tue, 13 Jun 2017 15:27:00 +0200 [thread overview]
Message-ID: <593FE824.9070600@iogearbox.net> (raw)
In-Reply-To: <149735983914.1567.4267221692702581758.stgit@firesoul>
On 06/13/2017 03:17 PM, Jesper Dangaard Brouer wrote:
> The selftests depend on using the shell exit code as a mean of
> detecting the success or failure of test-binary executed. The
> appropiate output "[PASS]" or "[FAIL]" in generated by
> tools/testing/selftests/lib.mk.
>
> Notice that the exit code is masked with 255. Thus, be careful if
> using the number of errors as the exits code, as 256 errors would be
> seen as a success.
>
> There are two standard defined exit(3) codes:
> /usr/include/stdlib.h
> #define EXIT_FAILURE 1 /* Failing exit status. */
> #define EXIT_SUCCESS 0 /* Successful exit status. */
>
> Fix test_verifier.c to not use the negative value of variable
> "results", but instead return EXIT_FAILURE.
>
> Fix test_align.c and test_progs.c to actually use exit codes, before
> they were always indicating success regardless of results.
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
next prev parent reply other threads:[~2017-06-13 13:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170613142211.4bc50e1f@redhat.com>
2017-06-13 13:17 ` [PATCH net-next] selftests/bpf: make correct use of exit codes in bpf selftests Jesper Dangaard Brouer
2017-06-13 13:27 ` Daniel Borkmann [this message]
2017-06-13 13:35 ` Fengguang Wu
2017-06-13 17:59 ` David Miller
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=593FE824.9070600@iogearbox.net \
--to=borkmann@iogearbox.net \
--cc=brouer@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.