DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v5 3/4] test: add test for packet dissector
Date: Fri, 2 Aug 2024 09:38:23 +0100	[thread overview]
Message-ID: <Zqya__Lw8Tj5l66E@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20240801190617.201574-4-stephen@networkplumber.org>

On Thu, Aug 01, 2024 at 12:04:42PM -0700, Stephen Hemminger wrote:
> Some tests for new packet dissector.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  app/test/meson.build    |   1 +
>  app/test/test_dissect.c | 245 ++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 246 insertions(+)
>  create mode 100644 app/test/test_dissect.c
> 
> diff --git a/app/test/meson.build b/app/test/meson.build
> index e29258e6ec..9cd2051320 100644
> --- a/app/test/meson.build
> +++ b/app/test/meson.build
> @@ -62,6 +62,7 @@ source_file_deps = {
>      'test_debug.c': [],
>      'test_devargs.c': ['kvargs'],
>      'test_dispatcher.c': ['dispatcher'],
> +    'test_dissect.c': ['net'],
>      'test_distributor.c': ['distributor'],
>      'test_distributor_perf.c': ['distributor'],
>      'test_dmadev.c': ['dmadev', 'bus_vdev'],
> diff --git a/app/test/test_dissect.c b/app/test/test_dissect.c
> new file mode 100644
> index 0000000000..2c79acf766
> --- /dev/null
> +++ b/app/test/test_dissect.c

<snip>

> +static int
> +test_simple(void)
> +{
> +	struct rte_mbuf mb;
> +	uint8_t buf[RTE_MBUF_DEFAULT_BUF_SIZE];
> +	uint32_t data_len = PACKET_LEN;
> +	uint16_t src_port = rte_rand();
> +	const uint16_t dst_port = rte_cpu_to_be_16(9); /* Discard port */
> +	char obuf[LINE_MAX];
> +
> +	/* make a dummy packet */
> +	mbuf_prep(&mb, buf, sizeof(buf));
> +	add_header(&mb, data_len, src_port, dst_port);
> +	fill_data(&mb, data_len - mb.data_off);
> +
> +	rte_dissect_mbuf(obuf, sizeof(obuf), &mb, 0);
> +
> +	return TEST_SUCCESS;
> +}

What are these test cases actually verifying - can any of them actually
fail? I don't see the output being checked anywhere.

/Bruce

  reply	other threads:[~2024-08-02  8:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 22:01 [PATCH] test-pmd: add more packet decode options (verbose) Stephen Hemminger
2024-03-13 21:49 ` Stephen Hemminger
2024-07-05  7:13 ` David Marchand
2024-07-23  2:44 ` [PATCH v2 0/3] Add packet dissector Stephen Hemminger
2024-07-23  2:44   ` [PATCH v2 1/3] net: add new " Stephen Hemminger
2024-07-23  2:44   ` [PATCH v2 2/3] test: add test for " Stephen Hemminger
2024-07-23  2:44   ` [PATCH v2 3/3] test-pmd: add more packet verbose decode options Stephen Hemminger
2024-07-23 20:33 ` [PATCH v3 0/3] add packet dissector function Stephen Hemminger
2024-07-23 20:33   ` [PATCH v3 1/3] net: add new packet dissector Stephen Hemminger
2024-07-23 20:33   ` [PATCH v3 2/3] test: add test for " Stephen Hemminger
2024-07-23 20:33   ` [PATCH v3 3/3] test-pmd: add more packet verbose decode options Stephen Hemminger
2024-07-24 18:46 ` [PATCH v4 0/3] Add packet dissector Stephen Hemminger
2024-07-24 18:46   ` [PATCH v4 1/3] net: add new " Stephen Hemminger
2024-07-24 18:46   ` [PATCH v4 2/3] test: add test for " Stephen Hemminger
2024-07-24 18:46   ` [PATCH v4 3/3] test-pmd: add more packet verbose decode options Stephen Hemminger
2024-08-01 19:04 ` [PATCH v5 0/4] Add network packet dissector Stephen Hemminger
2024-08-01 19:04   ` [PATCH v5 1/4] net: add more icmp types Stephen Hemminger
2024-08-01 19:04   ` [PATCH v5 2/4] net: add new packet dissector Stephen Hemminger
2024-08-01 19:04   ` [PATCH v5 3/4] test: add test for " Stephen Hemminger
2024-08-02  8:38     ` Bruce Richardson [this message]
2024-08-02 15:31       ` Stephen Hemminger
2024-08-02 18:06       ` Stephen Hemminger
2024-08-01 19:04   ` [PATCH v5 4/4] test-pmd: add more packet verbose decode options Stephen Hemminger
2024-08-02 18:07 ` [PATCH v6 0/4] Add network packet dissector Stephen Hemminger
2024-08-02 18:07   ` [PATCH v6 1/4] net: add more icmp types Stephen Hemminger
2024-08-02 18:07   ` [PATCH v6 2/4] net: add new packet dissector Stephen Hemminger
2024-08-02 18:07   ` [PATCH v6 3/4] test: add test for " Stephen Hemminger
2024-08-02 18:07   ` [PATCH v6 4/4] test-pmd: add more packet verbose decode options Stephen Hemminger
2024-08-02 19:56 ` [PATCH v7 0/4] Add network packet dissector Stephen Hemminger
2024-08-02 19:56   ` [PATCH v7 1/4] net: add more icmp types Stephen Hemminger
2024-08-02 19:56   ` [PATCH v7 2/4] net: add new packet dissector Stephen Hemminger
2024-08-02 19:56   ` [PATCH v7 3/4] test: add test for " Stephen Hemminger
2024-08-02 19:56   ` [PATCH v7 4/4] test-pmd: add more packet verbose decode options Stephen Hemminger
2024-08-20 13:42     ` Alex Chapman
2024-08-20 15:54       ` Stephen Hemminger
2024-08-22  9:04         ` Paul Szczepanek

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=Zqya__Lw8Tj5l66E@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.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).