From nobody Tue Apr 30 22:20:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1564409846; cv=none; d=zoho.com; s=zohoarc; b=Lfi4q0vzmWU6Gc8H7kGRY6ztwMe1dFibId8weXlEfTWk4ZrXohqeBM1JvJ00eGgDsjHrKHFH+bFO3R6Gx5f0gEjFnpbXvDysXCFBxT/2qhexD5eSS4Iekc+uI21GxjJ/rKfbamsnbxHVS+r4621acPnuh/LfeyS3M3X+PIQeD2Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564409846; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=htBaHbA9Upxeg6H6IDn2dx2QHTYG1jV6cBTgEgLi9G8=; b=Jtbqi+I61VN2sGFYTi6zQmzeEgq5dN0lbbgaWHO8duYPfERsHH55oJQBJ0OoOwQUt3vNeYy91H88PVpybSrtUytYLXpaf6k4q2gELTri1PizOr8CX7bLcu3yVbD/J1fTpJKAODjbqF/CFka9AZsqIz++NaPyqMU+x1swadSa0K4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1564409846433848.0569789727613; Mon, 29 Jul 2019 07:17:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2692B5945B; Mon, 29 Jul 2019 14:17:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF35710016E9; Mon, 29 Jul 2019 14:17:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B220041F63; Mon, 29 Jul 2019 14:17:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6TEHNu1016829 for ; Mon, 29 Jul 2019 10:17:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id 06C38600F8; Mon, 29 Jul 2019 14:17:23 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8674F6012A for ; Mon, 29 Jul 2019 14:17:20 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 29 Jul 2019 16:17:17 +0200 Message-Id: <65e3ea40954c728c6a7fb82ccbbb3cbe3e223330.1564409771.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] commandtest: Remove commandhelper.log in test27 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 29 Jul 2019 14:17:25 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The recently added test27 spawns commandhelper. This is fine, except, one of the things that commandhelper does is it records arguments it was spawn with into commandhelper.log. Other test cases then use checkoutput() to compare the arguments against the expected ones and also unlink() the log file. However, test27() is not doing that and thus it leaves the file behind. This breaks distcheck. Signed-off-by: Michal Privoznik Reviewed-by: Daniel P. Berrang=C3=A9 --- Another approach would be to explicitly just unlink() the file somewhere in the cleanup label. But I figured, comparing the args and unlinking the file afterwards is more robust check IMO. tests/commanddata/test27.log | 20 ++++++++++++++++++++ tests/commandtest.c | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 tests/commanddata/test27.log diff --git a/tests/commanddata/test27.log b/tests/commanddata/test27.log new file mode 100644 index 0000000000..40b2627c07 --- /dev/null +++ b/tests/commanddata/test27.log @@ -0,0 +1,20 @@ +ARG:--readfd +ARG:5 +ARG:--readfd +ARG:7 +ENV:DISPLAY=3D:0.0 +ENV:HOME=3D/home/test +ENV:HOSTNAME=3Dtest +ENV:LANG=3DC +ENV:LOGNAME=3Dtest +ENV:PATH=3D/usr/bin:/bin +ENV:TMPDIR=3D/tmp +ENV:USER=3Dtest +FD:0 +FD:1 +FD:2 +FD:5 +FD:7 +DAEMON:no +CWD:/tmp +UMASK:0022 diff --git a/tests/commandtest.c b/tests/commandtest.c index dfd15a2079..d7ab588969 100644 --- a/tests/commandtest.c +++ b/tests/commandtest.c @@ -1231,6 +1231,9 @@ static int test27(const void *unused ATTRIBUTE_UNUSED) goto cleanup; } =20 + if (checkoutput("test27", NULL) < 0) + goto cleanup; + ret =3D 0; =20 cleanup: --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list