From patchwork Fri Nov 2 11:52:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 150033 Delivered-To: patches@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1975749ljp; Fri, 2 Nov 2018 04:52:50 -0700 (PDT) X-Google-Smtp-Source: AJdET5eEKElVIbvnqauWuR7o/BKmDqUV8kzC3cy/5jGKkN5aE+ees/V6MReNzGR/SulJnvODeYzg X-Received: by 2002:a63:5c61:: with SMTP id n33-v6mr10291224pgm.1.1541159570183; Fri, 02 Nov 2018 04:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541159570; cv=none; d=google.com; s=arc-20160816; b=cII3Eg8gutLq31FvSIFUCSqvzzEwmHe+S+nvgdZ4i45nxTi/wPQ+CgWHaPhbeS2Rk1 2r5tqyGqPqwTnaNHFSwQbANeYwlPTFSGDmDOyszEio6RlR10eXUMHHHH2zgF9AV4kePg l9hrAAiXQtptgMqsqW/TRy6VPuqaJdkkxHctYnTzU52kQtcWcz1xb4C87CQlhS4alAG/ 9Q+EkgNTndR/+0M2eW2CvOYEhHmXCaF0L7zNi1Jr1g9CkCepNjemRnMqLdUvW2r8H662 Q+84c2sDIOmML9iNo8PM8k1fNCnN1m+gZ+o+3UZwwepAr010kxpMXsad3vpO2C926cXU Sw3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=1vflwqftlaGa8CqJ/t7Kszyhd/bD+G04sZSy/DOUTMI=; b=aj2w0o1369hnhDQ79z/5dIYkEegYbjF5hzFYh+9Vhju0osXufDCyzEy78msZ2SzqHx IB5hHTpYiSGORWDHeC+lmP/mqHrj0oaLCsgItAcbU+xjzvA3F8QFZtZMsAOrv+xk9KfJ gW5o8ogdflF03jtO4P2cgOAo6SrnA7y05Q14dQKGDw4CO1ybVH/w8Ru7b+ZeKeJS3qcj neWdr+AjeYuzkahwvkgp6/Zqs1yZPjf6PfgdswOUNLaMQyVsKYLcQPvmD/71Qndy78Nz adbpnVfnDew1FXux7gKIfWKH7MiaVZ1Bm2m1bRAh1V05A2P6XZbbICJe0YfQeJn/Kpd+ 0eyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id l12-v6si32839670pgj.76.2018.11.02.04.52.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 04:52:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1gIY0L-0003Li-EB; Fri, 02 Nov 2018 11:52:45 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= Subject: [PATCH v2 for-3.1 2/4] tests: Move tests/hex-loader-check-data/ to tests/data/hex-loader/ Date: Fri, 2 Nov 2018 11:52:37 +0000 Message-Id: <20181102115239.22485-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102115239.22485-1-peter.maydell@linaro.org> References: <20181102115239.22485-1-peter.maydell@linaro.org> MIME-Version: 1.0 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%) -- 2.19.1 diff --git a/configure b/configure index 895b7483b8a..bfdca8b814e 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 b653d44ba10..834ed52c22b 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 f2360efe3ed..5c342a670f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1369,7 +1369,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