From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53614 invoked by alias); 13 Mar 2019 13:12:16 -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 53604 invoked by uid 89); 13 Mar 2019 13:12:16 -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=-26.3 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=-26.3 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 objcopy-strip-debug.sh and objcopy-remove-debug-abbrev.sh test-case Message-ID: <20190313131258.GA4116@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/msg00116.txt.bz2 Hi, Add test-cases that: - test behaviour for an executable without debug info - test behaviour for an executable with debug info, but without .debug_abbrev section. Committed to trunk. Thanks, - Tom Add objcopy-strip-debug.sh and objcopy-remove-debug-abbrev.sh test-case 2019-03-13 Tom de Vries * testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh: New test. * testsuite/dwz.tests/objcopy-strip-debug.sh: New test. --- testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh | 21 +++++++++++++++++++++ testsuite/dwz.tests/objcopy-strip-debug.sh | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh b/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh new file mode 100755 index 0000000..70c59c8 --- /dev/null +++ b/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +objcopy --remove-section=.debug_abbrev ../hello 1 + +cp 1 1.saved + +if dwz 1 2>dwz.err; status=$?; then + true +fi + +[ $status -eq 1 ] + +if ! grep -q "\.debug_abbrev not present" dwz.err; then + exit 1 +fi + +cmp 1 1.saved + +rm -f 1 1.saved dwz.err diff --git a/testsuite/dwz.tests/objcopy-strip-debug.sh b/testsuite/dwz.tests/objcopy-strip-debug.sh new file mode 100755 index 0000000..9002964 --- /dev/null +++ b/testsuite/dwz.tests/objcopy-strip-debug.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +objcopy --strip-debug ../hello 1 + +cp 1 1.saved + +if dwz 1 2>dwz.err; status=$?; then + true +fi + +[ $status -eq 1 ] + +if ! grep -q "\.debug_info section not present" dwz.err; then + exit 1 +fi + +cmp 1 1.saved + +rm -f 1 1.saved dwz.err