netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: brouer@redhat.com
Cc: netdev@vger.kernel.org, fengguang.wu@intel.com,
	borkmann@iogearbox.net, 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 13:59:11 -0400 (EDT)	[thread overview]
Message-ID: <20170613.135911.2275664194512785458.davem@davemloft.net> (raw)
In-Reply-To: <149735983914.1567.4267221692702581758.stgit@firesoul>

From: Jesper Dangaard Brouer <brouer@redhat.com>
Date: Tue, 13 Jun 2017 15:17:19 +0200

> 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>

Applied with commit log message corrected, thanks.

      parent reply	other threads:[~2017-06-13 17:59 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
2017-06-13 13:35   ` Fengguang Wu
2017-06-13 17:59   ` David Miller [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=20170613.135911.2275664194512785458.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=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 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).