bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Karlsson <magnus.karlsson@gmail.com>
To: Ciara Loftus <ciara.loftus@intel.com>
Cc: "Network Development" <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>,
	"Karlsson, Magnus" <magnus.karlsson@intel.com>,
	"Björn Töpel" <bjorn@kernel.org>,
	"Weqaar Janjua" <weqaar.a.janjua@intel.com>
Subject: Re: [PATCH bpf-next 2/4] selftests/bpf: expose debug arg to shell script for xsk tests
Date: Fri, 19 Feb 2021 14:12:23 +0100	[thread overview]
Message-ID: <CAJ8uoz0CnquDSRZDRAYhLu=y8m-_Dzqs-J0d+-NSJk73wxfh4Q@mail.gmail.com> (raw)
In-Reply-To: <20210217160214.7869-3-ciara.loftus@intel.com>

On Wed, Feb 17, 2021 at 5:36 PM Ciara Loftus <ciara.loftus@intel.com> wrote:
>
> Launching xdpxceiver with -D enables debug mode. Make it possible

Would be clearer if the option was the same both in the shell and in
the xdpreceiver app, so please pick -d or -D and stick with it. And
how about calling the mode "dump packets" instead of debug, because
that is what it is doing right now?

> to pass this flag to the app via the test_xsk.sh shell script like
> so:
>
> ./test_xsk.sh -d
>
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
>  tools/testing/selftests/bpf/test_xsk.sh    | 7 ++++++-
>  tools/testing/selftests/bpf/xsk_prereqs.sh | 3 ++-
>  2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/test_xsk.sh b/tools/testing/selftests/bpf/test_xsk.sh
> index 91127a5be90d..a72f8ed2932d 100755
> --- a/tools/testing/selftests/bpf/test_xsk.sh
> +++ b/tools/testing/selftests/bpf/test_xsk.sh
> @@ -74,11 +74,12 @@
>
>  . xsk_prereqs.sh
>
> -while getopts "cv" flag
> +while getopts "cvd" flag
>  do
>         case "${flag}" in
>                 c) colorconsole=1;;
>                 v) verbose=1;;
> +               d) debug=1;;
>         esac
>  done
>
> @@ -135,6 +136,10 @@ if [[ $verbose -eq 1 ]]; then
>         VERBOSE_ARG="-v"
>  fi
>
> +if [[ $debug -eq 1 ]]; then
> +       DEBUG_ARG="-D"
> +fi
> +
>  test_status $retval "${TEST_NAME}"
>
>  ## START TESTS
> diff --git a/tools/testing/selftests/bpf/xsk_prereqs.sh b/tools/testing/selftests/bpf/xsk_prereqs.sh
> index ef8c5b31f4b6..d95018051fcc 100755
> --- a/tools/testing/selftests/bpf/xsk_prereqs.sh
> +++ b/tools/testing/selftests/bpf/xsk_prereqs.sh
> @@ -128,5 +128,6 @@ execxdpxceiver()
>                         copy[$index]=${!current}
>                 done
>
> -       ./${XSKOBJ} -i ${VETH0} -i ${VETH1},${NS1} ${copy[*]} -C ${NUMPKTS} ${VERBOSE_ARG}
> +       ./${XSKOBJ} -i ${VETH0} -i ${VETH1},${NS1} ${copy[*]} -C ${NUMPKTS} ${VERBOSE_ARG} \
> +               ${DEBUG_ARG}
>  }
> --
> 2.17.1
>

  reply	other threads:[~2021-02-19 13:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 16:02 [PATCH bpf-next 0/4] selftests/bpf: xsk improvements and new stats tests Ciara Loftus
2021-02-17 16:02 ` [PATCH bpf-next 1/4] selftest/bpf: make xsk tests less verbose Ciara Loftus
2021-02-22 11:58   ` Maciej Fijalkowski
2021-02-17 16:02 ` [PATCH bpf-next 2/4] selftests/bpf: expose debug arg to shell script for xsk tests Ciara Loftus
2021-02-19 13:12   ` Magnus Karlsson [this message]
2021-02-22 14:29     ` Loftus, Ciara
2021-02-17 16:02 ` [PATCH bpf-next 3/4] selftests/bpf: restructure xsk selftests Ciara Loftus
2021-02-18  9:33   ` Björn Töpel
2021-02-22 11:23   ` Maciej Fijalkowski
2021-02-23  8:24     ` Loftus, Ciara
2021-02-17 16:02 ` [PATCH bpf-next 4/4] selftests/bpf: introduce xsk statistics tests Ciara Loftus
2021-02-22 11:56   ` Maciej Fijalkowski
2021-02-22 14:33     ` Loftus, Ciara

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='CAJ8uoz0CnquDSRZDRAYhLu=y8m-_Dzqs-J0d+-NSJk73wxfh4Q@mail.gmail.com' \
    --to=magnus.karlsson@gmail.com \
    --cc=bjorn@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=ciara.loftus@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=weqaar.a.janjua@intel.com \
    /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).