From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129711 invoked by alias); 17 Mar 2019 15:20:43 -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 129694 invoked by uid 89); 17 Mar 2019 15:20:43 -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.2 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=maintained, UD:info X-Spam-Status: No, score=-25.2 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 twice-hardlink.sh test-case Message-ID: <20190317152125.GA16669@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/msg00149.txt.bz2 Hi, Add a test-case that tests that hardlinks are maintained when files cannot be compressed further. Committed to trunk. Thanks, - Tom Add twice-hardlink.sh test-case 2019-03-17 Tom de Vries * testsuite/dwz.tests/twice-hardlink.sh: New test. --- testsuite/dwz.tests/twice-hardlink.sh | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/testsuite/dwz.tests/twice-hardlink.sh b/testsuite/dwz.tests/twice-hardlink.sh new file mode 100644 index 0000000..207e18d --- /dev/null +++ b/testsuite/dwz.tests/twice-hardlink.sh @@ -0,0 +1,36 @@ +cp ../hello 1 +ln 1 2 + +dwz -h 1 2 + +smaller-than.sh 1 ../hello + +hardlinks-p.sh 1 2 + +cp 1 1.saved + +if dwz -h 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 + +[ $status -eq 0 ] + +cmp 1 1.saved + +rm -f 1 1.saved 2 2.saved dwz.err + +if [ -f 2.#dwz#.* ]; then + echo "PR24275 workaround used" > dwz.info + rm -f 2.#dwz#.* +fi