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.133.124]) by passt.top (Postfix) with ESMTP id 863B95A026D for ; Wed, 23 Aug 2023 14:09:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1692792558; 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=3NJeabXnV8URpK213H7NisJOKJvcZbh6L1lGaC1zIgk=; b=XZjfRKD/9JBpw2S9TFZIm/fni7T3CI0sFas30ld/913lDQpOxo64a4JPSKqfZo/iA7HdQA Uq+FBQDlqXOCMKlLFz8mjR8MlJJeztqQMCZzKkk6E3RM1EuO4yrC8OrDWbIRf1kUQpNZ0J lHwHELzSwpHtAhi+6HWhBbIvD/KPuAo= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-310-9u6ol6STMFKdEw40J2-Rmg-1; Wed, 23 Aug 2023 08:09:16 -0400 X-MC-Unique: 9u6ol6STMFKdEw40J2-Rmg-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3fe4f953070so37430085e9.2 for ; Wed, 23 Aug 2023 05:09:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692792555; x=1693397355; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3NJeabXnV8URpK213H7NisJOKJvcZbh6L1lGaC1zIgk=; b=ipjvpL9bVigH5B8gk5PLzdfchjTgGQKsspnpRAkM/smNgHzIdxhpULc2eenu/CmIi4 +9jlddi6tgiZrMnt7diRbHfJ+81L882SFX0Sgu4hup6F5Ti6ulMQNMZm80KwTBMWfKp4 QgCzspx7sdpT3+2/a1loofEvaRQqITD+bw7msN4tu4MHePhhdr3p+koiqDhBWK5ocsR3 zXZ7q4i941ZENma+edO5psIovtOkr6agasuLRyOfuumQs6ys5eWOSoMp7sx0IkiTiZIf jcQgdoYaYDeLS8fmhaknCVgcNUMyyLI6S+DXCrny2/EnjccWhneHc3h3z9BBHEUF1EEA ue+g== X-Gm-Message-State: AOJu0YwQQrPKcDLA0FnLbW26WK4r5Epw06tbAtK7z5MzJ4J/jJ4k4b81 W7XzIPt6IGabP0L3UZI9gpvUeqiOZ+Xmj/xxrx1aUioMNR0BgZjQbv+Dl9eLuzyAY6ENxWIc2tM Rfqi5IBDJBy5M X-Received: by 2002:a05:600c:2993:b0:400:57d1:4911 with SMTP id r19-20020a05600c299300b0040057d14911mr684261wmd.16.1692792555432; Wed, 23 Aug 2023 05:09:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDQ+ySmJ9kGh85eCIPM6KoMkNwid2vIPntfwbZONxRGhA5EiaI6kWK2ktpZWaCZrvudPzW1A== X-Received: by 2002:a05:600c:2993:b0:400:57d1:4911 with SMTP id r19-20020a05600c299300b0040057d14911mr684242wmd.16.1692792555050; Wed, 23 Aug 2023 05:09:15 -0700 (PDT) Received: from [192.168.188.25] ([80.243.52.136]) by smtp.gmail.com with ESMTPSA id c1-20020a7bc001000000b003fee567235bsm14516659wmb.1.2023.08.23.05.09.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Aug 2023 05:09:14 -0700 (PDT) Message-ID: Date: Wed, 23 Aug 2023 14:09:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] test: Add Podman system test with bats for pasta To: Stefano Brivio , passt-dev@passt.top References: <20230823093515.1950858-1-sbrivio@redhat.com> From: Paul Holzinger In-Reply-To: <20230823093515.1950858-1-sbrivio@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: LJLGFDCZ736WXN5252G4QNFSRW4GT42G X-Message-ID-Hash: LJLGFDCZ736WXN5252G4QNFSRW4GT42G X-MailFrom: pholzing@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: 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 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. > > 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. 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. > 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