public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Remove previous test files before running the next round
@ 2018-07-16 10:01 Ulf Hermann
  2018-07-16 21:58 ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Ulf Hermann @ 2018-07-16 10:01 UTC (permalink / raw)
  To: elfutils-devel

strip explicitly creates the new files. This will not work on windows if
the files already exist.

Also, if strip fails to create the files for any reason, we would check
the previous run's files and succeed. However, the test should fail
then.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
 tests/ChangeLog          | 5 +++++
 tests/run-strip-reloc.sh | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 0677b9fb..4e293d4b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-16  Ulf Hermann  <ulf.hermann@qt.io>
+
+	* run-strip-reloc.sh: Remove previous testfiles before running the
+	next test.
+
 2018-07-05  Mark Wielaard  <mark@klomp.org>
 
 	* next_cfi.c (handle_section): Take a new argument name. Check
diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh
index b1c85345..41afeeb8 100755
--- a/tests/run-strip-reloc.sh
+++ b/tests/run-strip-reloc.sh
@@ -32,6 +32,8 @@ runtest() {
   outfile2=out.stripped2
   debugfile2=out.debug2
 
+  rm -f $outfile1 $debugfile1 $outfile2 $debugfile2
+
   testrun ${abs_top_builddir}/src/strip -o $outfile1 -f $debugfile1 $infile ||
   { echo "*** failure strip $infile"; status=1; }
 
-- 
2.11.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Remove previous test files before running the next round
  2018-07-16 10:01 [PATCH 1/2] Remove previous test files before running the next round Ulf Hermann
@ 2018-07-16 21:58 ` Mark Wielaard
  2018-07-17 10:33   ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2018-07-16 21:58 UTC (permalink / raw)
  To: Ulf Hermann; +Cc: elfutils-devel

On Mon, Jul 16, 2018 at 12:01:21PM +0200, Ulf Hermann wrote:
> strip explicitly creates the new files. This will not work on windows if
> the files already exist.
> 
> Also, if strip fails to create the files for any reason, we would check
> the previous run's files and succeed. However, the test should fail
> then.

This makes sense and does uncover a bug as your second patch shows.
I want to fix that first and only then commit this fix. That way we
don't have the testsuite failing between commits.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] Remove previous test files before running the next round
  2018-07-16 21:58 ` Mark Wielaard
@ 2018-07-17 10:33   ` Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2018-07-17 10:33 UTC (permalink / raw)
  To: Ulf Hermann; +Cc: elfutils-devel

On Mon, 2018-07-16 at 23:57 +0200, Mark Wielaard wrote:
> On Mon, Jul 16, 2018 at 12:01:21PM +0200, Ulf Hermann wrote:
> > strip explicitly creates the new files. This will not work on
> > windows if
> > the files already exist.
> > 
> > Also, if strip fails to create the files for any reason, we would
> > check
> > the previous run's files and succeed. However, the test should fail
> > then.
> 
> This makes sense and does uncover a bug as your second patch shows.
> I want to fix that first and only then commit this fix. That way we
> don't have the testsuite failing between commits.

Pushed now that we have an updated hello_riscv64.ko test file.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-17 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 10:01 [PATCH 1/2] Remove previous test files before running the next round Ulf Hermann
2018-07-16 21:58 ` Mark Wielaard
2018-07-17 10:33   ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).