From ec86e5fa64540a6bb027b0dd505322455968c8e2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 14 Jun 2010 17:44:38 -0700 Subject: Fix unstrip for modifying file in place. --- tests/ChangeLog | 4 ++++ tests/run-unstrip-test.sh | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/ChangeLog b/tests/ChangeLog index 60b0847a..0176fb49 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2010-06-04 Roland McGrath + + * run-unstrip-test.sh: Also test modifying the file in place. + 2010-04-22 Roland McGrath * addrcfi.c (handle_cfi): Fix function name in error message. diff --git a/tests/run-unstrip-test.sh b/tests/run-unstrip-test.sh index 8f0fc698..b9959a10 100755 --- a/tests/run-unstrip-test.sh +++ b/tests/run-unstrip-test.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2007 Red Hat, Inc. +# Copyright (C) 2007-2010 Red Hat, Inc. # This file is part of Red Hat elfutils. # # Red Hat elfutils is free software; you can redistribute it and/or modify @@ -30,7 +30,7 @@ stripped=${stripped:-testfile17} debugfile=${debugfile:-${stripped}.debug} testfiles $original $stripped $debugfile -tempfiles testfile.unstrip +tempfiles testfile.unstrip testfile.inplace # These are old reference output from run-test-strip6.sh, when # strip left the .debug file with unchanged sh_size in @@ -40,3 +40,12 @@ tempfiles testfile.unstrip testrun ../src/unstrip -o testfile.unstrip $stripped $debugfile testrun ../src/elfcmp --hash-inexact $original testfile.unstrip + +# Also test modifying the file in place. + +rm -f testfile.inplace +cp $debugfile testfile.inplace +chmod 644 testfile.inplace +testrun ../src/unstrip $stripped testfile.inplace + +testrun ../src/elfcmp --hash-inexact $original testfile.inplace -- cgit v1.2.3