From nobody Mon Feb 9 14:34:33 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 8.43.85.245 is neither permitted nor denied by domain of lists.libvirt.org) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1711195590796632.5867281099579; Sat, 23 Mar 2024 05:06:30 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C519222B3; Sat, 23 Mar 2024 08:06:27 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 471911BC2; Sat, 23 Mar 2024 07:39:38 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 96A931CB5; Sat, 23 Mar 2024 07:39:30 -0400 (EDT) Received: from mx1.osci.io (polly.osci.io [8.43.85.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 1A9491D62 for ; Sat, 23 Mar 2024 07:32:55 -0400 (EDT) Received: by mx1.osci.io (Postfix, from userid 994) id 761F3223F7; Fri, 22 Mar 2024 13:56:53 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by mx1.osci.io (Postfix) with ESMTPS id 0C97B223F7 for ; Fri, 22 Mar 2024 13:56:53 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-LoKp0M3rOtecJL1NeJRKhw-1; Fri, 22 Mar 2024 13:56:50 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B378429AB428 for ; Fri, 22 Mar 2024 17:56:50 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D9D4492BDA for ; Fri, 22 Mar 2024 17:56:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-MC-Unique: LoKp0M3rOtecJL1NeJRKhw-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 33/35] tests: Reimplement 'libvirtd-fail' case directly in meson Date: Fri, 22 Mar 2024 18:56:11 +0100 Message-ID: <8b877f85585370649be8cf45da841b49c1984c86.1711129973.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Message-ID-Hash: 4S6S44YTYX2NS2EXRFYPCWFH3HXS6HZ7 X-Message-ID-Hash: 4S6S44YTYX2NS2EXRFYPCWFH3HXS6HZ7 X-MailFrom: SRS0=Xa5W=K4=redhat.com=pkrempa@osci.io X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1711195591248100001 The test simply invokes libvirtd and expects it to fail. We can do that directly in meson without the need for a wrapper script. Signed-off-by: Peter Krempa --- src/meson.build | 5 +++++ tests/libvirtd-fail | 16 ---------------- tests/meson.build | 8 +++++++- 3 files changed, 12 insertions(+), 17 deletions(-) delete mode 100755 tests/libvirtd-fail diff --git a/src/meson.build b/src/meson.build index f52d2d5994..a51f40fe16 100644 --- a/src/meson.build +++ b/src/meson.build @@ -654,6 +654,11 @@ foreach daemon : virt_daemons install_dir: sbindir, install_rpath: libvirt_rpath, ) + + # libvirtd_prog is needed by the test suite + if daemon['name'] =3D=3D 'libvirtd' + libvirtd_prog =3D bin + endif endforeach diff --git a/tests/libvirtd-fail b/tests/libvirtd-fail deleted file mode 100755 index f9e927b61f..0000000000 --- a/tests/libvirtd-fail +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# Ensure that libvirt fails when given nonexistent --config=3DFILE - -. "$(dirname $0)/test-lib.sh" - -if test "$VERBOSE" =3D yes; then - set -x - $abs_top_builddir/src/libvirtd --version -fi - -fail=3D0 - -$abs_top_builddir/src/libvirtd --config=3Dno-such-conf --timeout=3D5 2> log -RET=3D$? - -test "$RET" !=3D "0" && exit 0 || exit 1 diff --git a/tests/meson.build b/tests/meson.build index 8ccc63b3a6..4da1b099e4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -701,8 +701,14 @@ endforeach test_scripts =3D [] if conf.has('WITH_LIBVIRTD') + test('libvirtd fail with missing config', + libvirtd_prog, + args: [ '--config=3Dno-such-conf', '--timeout=3D5' ], + should_fail: true, + suite: 'bin', + ) + test_scripts +=3D [ - 'libvirtd-fail', 'virsh-auth', 'virsh-uriprecedence', ] --=20 2.44.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org