From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20829 invoked by alias); 17 Mar 2019 10:08:39 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 20813 invoked by uid 89); 17 Mar 2019 10:08:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-25.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Add test-cases twice.sh and twice-multifile.sh Message-ID: <20190317100921.GA30087@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-q1/txt/msg00147.txt.bz2 Hi, Add test-cases that check the behaviour of dwz when it fails to compress. In addition, these test-cases verify that dwz can process its own output as input. Committed to trunk. Thanks, - Tom Add test-cases twice.sh and twice-multifile.sh 2019-03-17 Tom de Vries * testsuite/dwz.tests/twice-multifile.sh: New test. * testsuite/dwz.tests/twice.sh: New test. --- testsuite/dwz.tests/twice-multifile.sh | 36 ++++++++++++++++++++++++++++++++++ testsuite/dwz.tests/twice.sh | 28 ++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/testsuite/dwz.tests/twice-multifile.sh b/testsuite/dwz.tests/twice-multifile.sh new file mode 100644 index 0000000..fded77a --- /dev/null +++ b/testsuite/dwz.tests/twice-multifile.sh @@ -0,0 +1,36 @@ +cp ../hello 1 +cp 1 2 + +dwz 1 2 + +smaller-than.sh 1 ../hello +smaller-than.sh 2 ../hello + +cp 1 1.saved +cp 2 2.saved + +if dwz -m 3 1 2 2>dwz.err; status=$?; then + true +fi + +if ! grep -q "DWARF compression not beneficial" dwz.err; then + cat dwz.err + exit 1 +fi + +if [ $(grep -qv "DWARF compression not beneficial" dwz.err \ + | wc -l) -gt 0 ]; then + cat dwz.err + exit 1 +fi + +if [ $status -eq 1 ]; then + # PR24354 + true +else + [ $status -eq 0 ] +fi + +cmp 1 1.saved + +rm -f 1 1.saved 2 2.saved dwz.err diff --git a/testsuite/dwz.tests/twice.sh b/testsuite/dwz.tests/twice.sh new file mode 100644 index 0000000..4db798e --- /dev/null +++ b/testsuite/dwz.tests/twice.sh @@ -0,0 +1,28 @@ +cp ../hello 1 + +dwz 1 + +smaller-than.sh 1 ../hello + +cp 1 1.saved + +if dwz 1 2>dwz.err; status=$?; then + true +fi + +if ! grep -q "DWARF compression not beneficial" dwz.err; then + cat dwz.err + exit 1 +fi + +if [ $(grep -qv "DWARF compression not beneficial" dwz.err \ + | wc -l) -gt 0 ]; then + cat dwz.err + exit 1 +fi + +[ $status -eq 0 ] + +cmp 1 1.saved + +rm -f 1 1.saved dwz.err