From nobody Tue Feb 10 05:39:44 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 171119495968446.34939516893928; Sat, 23 Mar 2024 04:55:59 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 543561D17; Sat, 23 Mar 2024 07:55:58 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 0034D21D1; Sat, 23 Mar 2024 07:36:11 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9575D1AAC; Sat, 23 Mar 2024 07:36:03 -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 4A96A1C00 for ; Sat, 23 Mar 2024 07:32:53 -0400 (EDT) Received: by mx1.osci.io (Postfix, from userid 994) id 6BE53223E8; Fri, 22 Mar 2024 13:56:45 -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 E4B9C223E7 for ; Fri, 22 Mar 2024 13:56:44 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-vzpUrB-gNlOSrD93w3W5JQ-1; Fri, 22 Mar 2024 13:56:42 -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 90ACA186542A for ; Fri, 22 Mar 2024 17:56:42 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B830492BD0 for ; Fri, 22 Mar 2024 17:56:41 +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: vzpUrB-gNlOSrD93w3W5JQ-1 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 24/35] virshtest: Adapt 'virsh-schedinfo' Date: Fri, 22 Mar 2024 18:56:02 +0100 Message-ID: <58aa7dacc181887afa3735ec53cc38be43f24c11.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: 7M2MGRUZGI5ONU6HKPYWXMNHE2N3G2LJ X-Message-ID-Hash: 7M2MGRUZGI5ONU6HKPYWXMNHE2N3G2LJ 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: 1711194961425100001 It's a simple virsh invocation which can be done in 'virshtest' Signed-off-by: Peter Krempa --- tests/meson.build | 1 - tests/virsh-schedinfo | 40 ------------------- tests/virshtest.c | 2 +- .../schedinfo-invalid-argument.out | 5 +++ 4 files changed, 6 insertions(+), 42 deletions(-) delete mode 100755 tests/virsh-schedinfo create mode 100644 tests/virshtestdata/schedinfo-invalid-argument.out diff --git a/tests/meson.build b/tests/meson.build index cd473d4ad6..8392778a76 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -694,7 +694,6 @@ if conf.has('WITH_LIBVIRTD') 'virsh-checkpoint', 'virsh-read-bufsiz', 'virsh-read-non-seekable', - 'virsh-schedinfo', 'virsh-self-test', 'virsh-snapshot', 'virsh-start', diff --git a/tests/virsh-schedinfo b/tests/virsh-schedinfo deleted file mode 100755 index e4e2509f76..0000000000 --- a/tests/virsh-schedinfo +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# Ensure that virsh schedinfo --set invalid=3Dval fails - -# Copyright (C) 2010-2011, 2013 Red Hat, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see -# . - -. "$(dirname $0)/test-lib.sh" - -VIRSH=3D$abs_top_builddir/tools/virsh - -if test "$VERBOSE" =3D yes; then - set -x - $VIRSH --version -fi - -printf 'Scheduler : fair\n\n' > exp-out || framework_failure -printf 'error: invalid scheduler option: j\n' > exp-err || framework_failu= re - -fail=3D0 - -test_url=3Dtest:///default - -$VIRSH -c $test_url schedinfo 1 --set j=3Dk >out 2>err && fail=3D1 -compare exp-out out || fail=3D1 -compare exp-err err || fail=3D1 - -(exit $fail); exit $fail diff --git a/tests/virshtest.c b/tests/virshtest.c index a09ab8c78b..f4c41fca46 100644 --- a/tests/virshtest.c +++ b/tests/virshtest.c @@ -203,7 +203,6 @@ mymain(void) /* test of splitting in vshStringToArray */ DO_TEST_SCRIPT("echo-split", NULL, VIRSH_DEFAULT, "-q"); -# undef DO_TEST /* comprehensive coverage of argument assignment */ DO_TEST_SCRIPT("argument-assignment", NULL, VIRSH_DEFAULT, "-k0", "-d0= "); @@ -216,6 +215,7 @@ mymain(void) DO_TEST_SCRIPT("vcpupin", NULL, VIRSH_DEFAULT); DO_TEST_FULL("domain-id-overflow", NULL, VIRSH_CUSTOM, "-q", "domname"= , "4294967298"); + DO_TEST_FULL("schedinfo-invalid-argument", NULL, VIRSH_DEFAULT, "sched= info", "1", "--set", "j=3Dk"); VIR_FREE(custom_uri); return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; diff --git a/tests/virshtestdata/schedinfo-invalid-argument.out b/tests/vir= shtestdata/schedinfo-invalid-argument.out new file mode 100644 index 0000000000..833c6dfd6a --- /dev/null +++ b/tests/virshtestdata/schedinfo-invalid-argument.out @@ -0,0 +1,5 @@ +Scheduler : fair +error: invalid scheduler option: j + + +## Exit code: 1 --=20 2.44.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org