From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id F27435A026D for ; Wed, 23 Aug 2023 14:15:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692792948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlDAryaCYKJag10orRK69KtrzJ2q0Zq9YIyn7r7ufCg=; b=Mn4iCtyPeN0itUrD5uc4shGJSUiXtbWzzmW/03MxxnmjZduJuKPItGiq7r+o7gaBAyw3gG ggNPr6SnL3i1Y5w1yW4nAwT++N6aB1UfnCAn9zELpJP4l01DQ+HJ93mx4ARO2oyj5mDYlr dvB4y2OHwGKW7FWLsuUBB08+P7VQze0= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-195-MVSDF7xoMIWTFEJGxI2i6A-1; Wed, 23 Aug 2023 08:15:47 -0400 X-MC-Unique: MVSDF7xoMIWTFEJGxI2i6A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F1CFA3C0FC9F; Wed, 23 Aug 2023 12:15:46 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9E21F492C3A; Wed, 23 Aug 2023 12:15:45 +0000 (UTC) Date: Wed, 23 Aug 2023 14:15:43 +0200 From: Stefano Brivio To: Paul Holzinger Subject: Re: [PATCH] test: Add Podman system test with bats for pasta Message-ID: <20230823141543.6fc003f2@elisabeth> In-Reply-To: References: <20230823093515.1950858-1-sbrivio@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: GK6MAGBNKZMOMAJQAJGKDRPY3LYPNA4J X-Message-ID-Hash: GK6MAGBNKZMOMAJQAJGKDRPY3LYPNA4J X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, 23 Aug 2023 14:09:13 +0200 Paul Holzinger wrote: > On 23/08/2023 11:35, 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. > > We actually ship a podman-tests rpm which contains `test/system` from > the podman repo. Of course this will contain the test version based on > the current shipped version and not the main branch. > But if you want to the with latest you have to clone from github of course. Not that I have a particular motivation... but podman-tests doesn't exist on, say, Debian. Still, I actually have a slight preference to test with the latest HEAD, yes, so that we can unblock things quickly in case. > > 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 > > Signed-off-by: Stefano Brivio > > --- > > test/README.md | 4 ++-- > > test/pasta_podman/bats | 22 ++++++++++++++++++++++ > > test/run | 4 ++++ > > 3 files changed, 28 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..f36da7c > > --- /dev/null > > +++ b/test/pasta_podman/bats > > @@ -0,0 +1,22 @@ > > +# 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 > > + > > +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 printf "[engine]\nhelper_binaries_dir=['__WD__']\n" > __STATEDIR__/containers.conf > > +host PODMAN="__STATEDIR__/podman/bin/podman" CONTAINERS_CONF_OVERRIDE="__STATEDIR__/containers.conf" bats __STATEDIR__/podman/test/system/505-networking-pasta.bats > > I recommend to use the `CONTAINERS_HELPER_BINARY_DIR` to set the > directory over containers.conf, with your containers.conf change you > will unset all other helper directories. Hah, thanks, that's how it's called, I couldn't find it. I'll post a new version. > This may be fine for the pasta specific tests for now as we do not use > other binaries such as netavark there but in the future it could change > and leaves you wondering what broke. Sure, I didn't like that either. -- Stefano