From nobody Mon Feb 9 00:42:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582643636; cv=none; d=zohomail.com; s=zohoarc; b=M/sywdlOh/Nr64h+CoILIeuioU22ii4zbKTSJ6gGRZiOIK8ZaCH+5WqlthAKH215CyCpDxt8pLonbTh+JRLJZCdrxz5uG1V76T634NBMFvlE6q6GHAORKTPjohRpwG/tJxMC5RHXefevK+D6PbZKthEiL0Nu+ZI+KlXwoQ49mJI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582643636; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SjaS3P94P86cbnJb7FE2dxVGEARWOCqkV6s3/6h3kVY=; b=IkP73Tgr/75HR1KgO38aK7vXe/DJQQ0C34vOUD9XE0Pee07cbo9aYvPvQU11vk39Z6GQZQmqJOFyx+r7e5/UciEa491s9e1doCp5KdqiSkPuZuYkWXJhrcRE6GZN9fLkbVkE+H9jiorB6vBzjzaHCRMYrxp4kpvtabB9H3jEiPM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582643636301420.90596319591555; Tue, 25 Feb 2020 07:13:56 -0800 (PST) Received: from localhost ([::1]:58454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6buF-00085r-5d for importer@patchew.org; Tue, 25 Feb 2020 10:13:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55163) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6bt9-0006GE-Ij for qemu-devel@nongnu.org; Tue, 25 Feb 2020 10:12:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6bt8-0000tl-KP for qemu-devel@nongnu.org; Tue, 25 Feb 2020 10:12:47 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:60904 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6bt8-0000tV-GG for qemu-devel@nongnu.org; Tue, 25 Feb 2020 10:12:46 -0500 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-vfwCJJz_N7OkD0vquyFCDA-1; Tue, 25 Feb 2020 10:12:44 -0500 Received: by mail-qk1-f198.google.com with SMTP id n130so10214177qke.19 for ; Tue, 25 Feb 2020 07:12:44 -0800 (PST) Received: from redhat.com (bzq-79-178-2-214.red.bezeqint.net. [79.178.2.214]) by smtp.gmail.com with ESMTPSA id z34sm7652256qtd.42.2020.02.25.07.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 07:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582643566; 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=SjaS3P94P86cbnJb7FE2dxVGEARWOCqkV6s3/6h3kVY=; b=P9DImOZOwKgfpFjMD6v+bYazwgvoJSPQ3C2dvSQhV7NdIAQDCb1486DcUGyRZbvzcTQ7VQ 2zLBAKVpZELy+q1dzXvVanH0LnmDLUNffmubU2PHpEdNBokSr6b3oldK+EIxxdqvFQb15J peCdjHCniqmzTm+nWN7VEFuh1R4xYOo= X-MC-Unique: vfwCJJz_N7OkD0vquyFCDA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=J5D3o460P1rhFujFo85Es8Mk9QVxMsWvqSgvXhqC66U=; b=NmOHD6TQ7fkjY/1qkIuFY6VMn0MAu+KaJhwrSorHnbC5CKnaCO03nKn58N9FnhWSzD SjoFc3tRQOAw7my/CJkFrK32DVJrhGUXfU3CmGT2cVhF+KUnWHcINLJT5DyQ0t2Ddt1l LkuUITs/aXWhtUeOfsp8j+SFZwz2+N0Vt4Tq5Q0kcZgiwilGuBgxTDTENST/4lL7O8dz 49USMCBHTDLNpQ2Y15Hq14WxmfLaoQ9crj3Qsyqp+DO40MVTfyID4RRXoij8FX1ajl1s bxXVHo65YJh8nVS2bFi9I63QJfbzFS0agO1XRMOMLRKG5Jr4CEY6V9Y+JVc2kxG1Lqx7 0rrg== X-Gm-Message-State: APjAAAXZaqjRNDI/hn3XY1OSHa4afox6junBkEWEK13JfZsm742EYcsx BB8y/hN9lIW5d9t+vThFrM8iX8mLzJ/YhKu912n7rdK7jGqADH+P2fUc12y7g9QcmOibuayBiyS Z7ina7HNFMAtHNjM= X-Received: by 2002:aed:3324:: with SMTP id u33mr52520211qtd.322.1582643563684; Tue, 25 Feb 2020 07:12:43 -0800 (PST) X-Google-Smtp-Source: APXvYqynn7/+8ZltdmYi6IBqD4+4Uij0q5vOGxRokGddAQo3bE+6kbnyMJevv1OKQyoTkpVfP32ZKw== X-Received: by 2002:aed:3324:: with SMTP id u33mr52520182qtd.322.1582643563445; Tue, 25 Feb 2020 07:12:43 -0800 (PST) Date: Tue, 25 Feb 2020 10:12:39 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 03/32] bios-tables-test: default diff command Message-ID: <20200225151210.647797-4-mst@redhat.com> References: <20200225151210.647797-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200225151210.647797-1-mst@redhat.com> X-Mailer: git-send-email 2.24.1.751.gd10ce2899c X-Mutt-Fcc: =sent X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Most people probably just want diff -u. So let's use that as the default. Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 1aed0ee7df..0a597bbacf 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -465,25 +465,18 @@ static void test_acpi_asl(test_data *data) exp_sdt->asl_file, exp_sdt->aml_file); fflush(stderr); if (getenv("V")) { - const char *diff_cmd =3D getenv("DIFF"); - if (diff_cmd) { - char *diff =3D g_strdup_printf("%s %s %s", diff_cm= d, - exp_sdt->asl_file, sdt->asl_file); - int out =3D dup(STDOUT_FILENO); - int ret G_GNUC_UNUSED; + const char *diff_env =3D getenv("DIFF"); + const char *diff_cmd =3D diff_env ? diff_env : "diff -= u"; + char *diff =3D g_strdup_printf("%s %s %s", diff_cmd, + exp_sdt->asl_file, sdt->a= sl_file); + int out =3D dup(STDOUT_FILENO); + int ret G_GNUC_UNUSED; =20 - dup2(STDERR_FILENO, STDOUT_FILENO); - ret =3D system(diff) ; - dup2(out, STDOUT_FILENO); - close(out); - g_free(diff); - } else { - fprintf(stderr, "acpi-test: Warning. not showing " - "difference since no diff utility is specified= . " - "Set 'DIFF' environment variable to a preferre= d " - "diff utility and run 'make V=3D1 check' again= to " - "see ASL difference."); - } + dup2(STDERR_FILENO, STDOUT_FILENO); + ret =3D system(diff) ; + dup2(out, STDOUT_FILENO); + close(out); + g_free(diff); } } } --=20 MST