public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Subject: Re: [PATCH 06/12] test: Simplify data handling for transfer tests
Date: Sat, 24 Sep 2022 01:08:50 +0200	[thread overview]
Message-ID: <20220924010850.06ba1e51@elisabeth> (raw)
In-Reply-To: <20220923072038.1667106-7-david@gibson.dropbear.id.au>

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

On Fri, 23 Sep 2022 17:20:32 +1000
David Gibson <david(a)gibson.dropbear.id.au> wrote:

> Many of our tests are based around performing transfers of sample data
> across passt/pasta created links.  The data flow here can be a bit
> hard to follow since, e.g. we create a file transfer it to the guest,
> then transfer it back to the host across several different tests.
> This also means that the test cases aren't independent of each other.
> 
> Because we don't have the original file available at both ends in some
> cases, we compare them by generating md5sums at each end and comparing
> them, which is a bit complicated.
> 
> Make a number of changes to simplify this:
>   1. Pre-generate the sample data files as a test asset, rather than
>      building them on the fly during the tests proper
>   2. Include the sample data files in the mbuto guest image
>   3. Because we have good copies of the original data available in all
>      contexts, we can now simply use 'cmp' to check if the transfer
>      has worked, avoiding md5sum complications.
>   4. Similarly we can always use the original copy of the sample data
>      on the send side of each transfer, meaning that the tests become
>      more independent of each other.
> 
> Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au>
> ---
>  test/.gitignore       |   1 +
>  test/Makefile         |  15 +++-
>  test/passt.mbuto      |   6 +-
>  test/passt/tcp        |  53 +++++-------
>  test/passt/udp        |  29 +++----
>  test/passt_in_ns/tcp  | 187 +++++++++++++++++-------------------------
>  test/passt_in_ns/udp  |  93 +++++++++------------
>  test/pasta/tcp        |  79 +++++++-----------
>  test/pasta/udp        |  43 ++++------
>  test/two_guests/basic |   2 +-
>  10 files changed, 214 insertions(+), 294 deletions(-)

Uh, yes, this does clean up a lot of mess.

-- 
Stefano


  reply	other threads:[~2022-09-23 23:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23  7:20 [PATCH 00/12] Assorted test fixes, batch 7 David Gibson
2022-09-23  7:20 ` [PATCH 01/12] test: Add wait_for() shell helper David Gibson
2022-09-23 23:07   ` Stefano Brivio
2022-09-24  2:59     ` David Gibson
2022-09-23  7:20 ` [PATCH 02/12] test: Remove unnecessary sleeps from layout functions David Gibson
2022-09-23 23:08   ` Stefano Brivio
2022-09-24  3:02     ` David Gibson
2022-09-23  7:20 ` [PATCH 03/12] test: Remove unnecessary sleeps from shutdown tests David Gibson
2022-09-23  7:20 ` [PATCH 04/12] test: More robust wait for pasta/passt to be ready David Gibson
2022-09-23 23:08   ` Stefano Brivio
2022-09-24  3:03     ` David Gibson
2022-09-23  7:20 ` [PATCH 05/12] test: Use --config-net for namespace setup David Gibson
2022-09-23  7:20 ` [PATCH 06/12] test: Simplify data handling for transfer tests David Gibson
2022-09-23 23:08   ` Stefano Brivio [this message]
2022-09-23  7:20 ` [PATCH 07/12] test: Remove unneccessary pane naming from layout_two_guests David Gibson
2022-09-23  7:20 ` [PATCH 08/12] clang-tidy: Disable 'readability-identifier-length' David Gibson
2022-09-23 23:08   ` Stefano Brivio
2022-09-24  3:06     ` David Gibson
2022-09-23  7:20 ` [PATCH 09/12] cppcheck: Avoid excessive scanning due to system headers David Gibson
2022-09-23  7:20 ` [PATCH 10/12] cppcheck: Run quietly David Gibson
2022-09-23  7:20 ` [PATCH 11/12] Makefile: Simplify getting target triple for compiler David Gibson
2022-09-23  7:20 ` [PATCH 12/12] cppcheck: Add target specific headers David Gibson

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=20220924010850.06ba1e51@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=passt-dev@passt.top \
    /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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

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 IMAP folder(s).