public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top, Paul Holzinger <pholzing@redhat.com>
Subject: Re: [PATCH v2] test: Add Podman system test with bats for pasta
Date: Thu, 24 Aug 2023 11:50:06 +1000	[thread overview]
Message-ID: <ZOa3TusWRbufGsW7@zatzit> (raw)
In-Reply-To: <20230823135149.2189371-1-sbrivio@redhat.com>

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

On Wed, Aug 23, 2023 at 03:51:49PM +0200, Stefano Brivio wrote:
> Ugly as hell, but we keep breaking things otherwise, and I keep
> forgetting to run this manually (as long as it's based on my local
> Podman setup, that's the only alternative).
> 
> We need to clone the Podman repository as distribution packages don't
> contain test scripts, typically. While at it, build the latest
> version which is what really matters.
> 
> As we're planning anyway to revamp the test framework, I'd be
> inclined to just add this without too many thoughts, and have it as
> a nice-to-have requirement reminder for the new framework.
> 
> Link: https://github.com/containers/podman/pull/19699
> Suggested-by: Paul Holzinger <pholzing@redhat.com>
> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>

Clunky, but better than nothing, so

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

My biggest concern here is that we're unconditionally pulling the
latest podman tree.  That means that if future podman adds tests for
newer pasta features, then checking out an old pasta will get failing
tests even for things that were correct at the time of release, which
can suck for bisection.

> ---
> v2: Use CONTAINERS_HELPER_BINARY_DIR to override pasta's path (Paul Holzinger)
> 
>  test/README.md         |  4 ++--
>  test/pasta_podman/bats | 21 +++++++++++++++++++++
>  test/run               |  4 ++++
>  3 files changed, 27 insertions(+), 2 deletions(-)
>  create mode 100644 test/pasta_podman/bats
> 
> diff --git a/test/README.md b/test/README.md
> index 03c7f57..0936b04 100644
> --- a/test/README.md
> +++ b/test/README.md
> @@ -28,8 +28,8 @@ on a system, i.e. common utilities such as a shell are not included here.
>  
>  Example for Debian, and possibly most Debian-based distributions:
>  
> -    build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bc
> -    clang-tidy cppcheck isc-dhcp-common psmisc linux-cpupower socat
> +    build-essential git jq strace iperf3 qemu-system-x86 tmux sipcalc bats bc
> +    catatonit clang-tidy cppcheck go isc-dhcp-common psmisc linux-cpupower socat
>      netcat-openbsd fakeroot lz4 lm-sensors qemu-system-arm qemu-system-ppc
>      qemu-system-misc qemu-system-x86 valgrind
>  
> diff --git a/test/pasta_podman/bats b/test/pasta_podman/bats
> new file mode 100644
> index 0000000..21446f0
> --- /dev/null
> +++ b/test/pasta_podman/bats
> @@ -0,0 +1,21 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +#
> +# PASST - Plug A Simple Socket Transport
> +#  for qemu/UNIX domain socket mode
> +#
> +# PASTA - Pack A Subtle Tap Abstraction
> +#  for network namespace/tap device mode
> +#
> +# test/pasta_podman/bats - Build Podman, run pasta system test with bats
> +#
> +# Copyright (c) 2022 Red Hat GmbH
> +# Author: Stefano Brivio <sbrivio@redhat.com>
> +
> +htools	git make go bats catatonit ip jq socat
> +
> +test	Podman system test with bats
> +
> +host	git -C __STATEDIR__ clone https://github.com/containers/podman.git
> +host	make -C __STATEDIR__/podman
> +hout	WD pwd
> +host	PODMAN="__STATEDIR__/podman/bin/podman" CONTAINERS_HELPER_BINARY_DIR="__WD__" bats __STATEDIR__/podman/test/system/505-networking-pasta.bats
> diff --git a/test/run b/test/run
> index 8f4f845..3b37663 100755
> --- a/test/run
> +++ b/test/run
> @@ -82,6 +82,10 @@ run() {
>  	test pasta_options/log_to_file
>  	teardown pasta_options
>  
> +	setup build
> +	test pasta_podman/bats
> +	teardown build
> +
>  	setup memory
>  	test memory/passt
>  	teardown memory

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2023-08-24  1:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23 13:51 [PATCH v2] test: Add Podman system test with bats for pasta Stefano Brivio
2023-08-24  1:50 ` David Gibson [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=ZOa3TusWRbufGsW7@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=pholzing@redhat.com \
    --cc=sbrivio@redhat.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.
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).