From patchwork Mon Nov 5 18:14:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 150221 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2935232ljp; Mon, 5 Nov 2018 10:21:24 -0800 (PST) X-Google-Smtp-Source: AJdET5fm7Sas07VrNKo+Goe7C/XUc5JHMvQHeqsccJlKU+GgKVIps/El3Qe787+mMLTCJw8iqB5T X-Received: by 2002:a37:9604:: with SMTP id y4mr13727249qkd.279.1541442084699; Mon, 05 Nov 2018 10:21:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541442084; cv=none; d=google.com; s=arc-20160816; b=TJV5uBFn5YixPxi4U2A/CCCYn7IYkrIEgzgCgUKKvnVrrWzfQmkS5hz6JDjuNkHgX7 pWXPJFbAzjICqHrxZPcwGlWtxx/7MMyjuWlPEfio20kzy2VHZJnYSWuztKkYOIedtIUW lRzDbRQ8sOZtx7b9GUgWoqplm7K/U89jGpVd7uzfNO9AV3014oxf6hYVZR6NeBOj9bMq 4ApusUkzje2HGaeQ0XI3E48LEUkZ3Lk7WGg8TpQ/TfSWxFPGI+OJOlstfwEOrITiqeIx L+WLUrfxZT2murPLV2Mp2xHO4TTOtKrWCSpfCOSvxXWWakYhMeSSMFqWv+gB7NJVoA0E vJSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:in-reply-to :content-disposition:mime-version:references:message-id:to:from:date; bh=UIP5zJ82Zof7xzMM76hUn1qPsPS7wIK963PBuGByuZA=; b=kovlx7bvHGu2wzW18jHcn67WqCqVIHycs+z46npX/8LnWxh8GYBKw38rZivpY0a5w5 QM7utNSqEuyIZe27DJlpl70UYwHuMWy8eBdmfwxx2JwWB6mcomDoSOd87JZ5z51yYuGv ovGXjddmQht6VbztgEw0t0WQXX7+M3777Ln1TBfKhpAs/0HP7vbEzVRL9RS6WI1Uq5zq A5bxezQb7cb5YV59+4y1MhMuwjFCJuuwRjZbteOmzGXU+2xsLvm9SlTe/uNFo27YJfw7 BIfVWO/6h2RRcaNa85nmgRt0vN7HzJoGC8achl8WGHLCztYGmDXwcBxfOeLx4GcmHy3c GVdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y203-v6si4553870qka.140.2018.11.05.10.21.24 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 05 Nov 2018 10:21:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:36904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjV6-00050p-2D for patch@linaro.org; Mon, 05 Nov 2018 13:21:24 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjOY-0005zS-HI for qemu-devel@nongnu.org; Mon, 05 Nov 2018 13:14:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJjOW-0000l0-Fu for qemu-devel@nongnu.org; Mon, 05 Nov 2018 13:14:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45908) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJjOW-0000iS-4r for qemu-devel@nongnu.org; Mon, 05 Nov 2018 13:14:36 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 48FC683F51; Mon, 5 Nov 2018 18:14:34 +0000 (UTC) Received: from redhat.com (ovpn-121-251.rdu2.redhat.com [10.10.121.251]) by smtp.corp.redhat.com (Postfix) with SMTP id 440755DD72; Mon, 5 Nov 2018 18:14:33 +0000 (UTC) Date: Mon, 5 Nov 2018 13:14:32 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20181105181353.39804-3-mst@redhat.com> References: <20181105181353.39804-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20181105181353.39804-1-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 05 Nov 2018 18:14:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 02/33] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/ X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Su Hang , Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Currently tests/hex-loader-check-data contains data files used by the hexloader-test, and configure individually symlinks those data files into the build directory using a wildcard. Using a wildcard like this is a bad idea, because if a new data file is added, nothing causes configure to be rerun, and so no symlink is added for the new file. This can cause tests to spuriously fail when they can't find their data. Instead, it's better to symlink an entire directory of data files. We already have such a directory: tests/data. Move the data files from tests/hex-loader-check-data/ to tests/data/hex-loader/, and remove the unnecessary symlinking. Signed-off-by: Peter Maydell --- configure | 4 ---- tests/hexloader-test.c | 2 +- MAINTAINERS | 2 +- tests/{hex-loader-check-data => data/hex-loader}/test.hex | 0 4 files changed, 2 insertions(+), 6 deletions(-) rename tests/{hex-loader-check-data => data/hex-loader}/test.hex (100%) -- MST diff --git a/configure b/configure index 895b7483b8..bfdca8b814 100755 --- a/configure +++ b/configure @@ -7421,10 +7421,6 @@ for bios_file in \ do FILES="$FILES pc-bios/$(basename $bios_file)" done -for test_file in $(find $source_path/tests/hex-loader-check-data -type f) -do - FILES="$FILES tests/hex-loader-check-data$(echo $test_file | sed -e 's/.*hex-loader-check-data//')" -done mkdir -p $DIRS for f in $FILES ; do if [ -e "$source_path/$f" ] && [ "$pwd_is_source_path" != "y" ]; then diff --git a/tests/hexloader-test.c b/tests/hexloader-test.c index b653d44ba1..834ed52c22 100644 --- a/tests/hexloader-test.c +++ b/tests/hexloader-test.c @@ -23,7 +23,7 @@ static void hex_loader_test(void) const unsigned int base_addr = 0x00010000; QTestState *s = qtest_initf( - "-M vexpress-a9 -nographic -device loader,file=tests/hex-loader-check-data/test.hex"); + "-M vexpress-a9 -nographic -device loader,file=tests/data/hex-loader/test.hex"); for (i = 0; i < 256; ++i) { uint8_t val = qtest_readb(s, base_addr + i); diff --git a/MAINTAINERS b/MAINTAINERS index 98a1856afc..cfabc14b59 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1370,7 +1370,7 @@ Intel Hexadecimal Object File Loader M: Su Hang S: Maintained F: tests/hexloader-test.c -F: tests/hex-loader-check-data/test.hex +F: tests/data/hex-loader/test.hex CHRP NVRAM M: Thomas Huth diff --git a/tests/hex-loader-check-data/test.hex b/tests/data/hex-loader/test.hex similarity index 100% rename from tests/hex-loader-check-data/test.hex rename to tests/data/hex-loader/test.hex