]> sourceware.org Git - glibc.git/commitdiff
Write to bench.out-tmp only once
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 15 Apr 2013 08:22:26 +0000 (13:52 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Mon, 15 Apr 2013 08:23:35 +0000 (13:53 +0530)
Appending benchmark program output on every run could result in a case
where the benchmark run was cancelled, resulting in a partially
written file.  This file gets used again on the next run, resulting in
results being appended to old results.

It could have been possible to remove the file before every benchmark
run, but it is easier to just write the output to bench.out-tmp only
once.

ChangeLog
benchtests/Makefile

index 6a02e77d1c0a2d69a0cdd68a4f281d8bd0040d5a..2284d7faf0aa38c47cee1d1d8007db41b3d5b537 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+       * benchtests/Makefile (bench): Write all output to
+       bench-out.tmp together.
+
 2013-04-15  Andreas Schwab  <schwab@suse.de>
 
        * nscd/nscd.c (main): Don't fork again after closing files.
index 3e794d798e9aafa62c2f6ce19ba3c1cb4c877407..bd0925b926b8d8205f5e3fd2a87272fb080cb2c2 100644 (file)
@@ -121,10 +121,10 @@ run-bench = $(test-wrapper-env) \
            $($*-ENV) $(rtld-prefix) $${run}
 
 bench: $(binaries-bench)
-       for run in $^; do \
-         echo "Running $${run}"; \
-         $(run-bench) >>  $(objpfx)bench.out-tmp; \
-       done; \
+       for run in $^; do \
+         echo "Running $${run}" >&2; \
+         $(run-bench); \
+       done; } > $(objpfx)bench.out-tmp; \
        if [ -f $(objpfx)bench.out ]; then \
          mv -f $(objpfx)bench.out $(objpfx)bench.out.old; \
        fi; \
This page took 0.115391 seconds and 5 git commands to generate.