~ubuntu-branches/ubuntu/wily/coreutils/wily-proposed

« back to all changes in this revision

Viewing changes to debian/patches/99_sort_-u_data_loss.dpatch

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-09 10:01:28 UTC
  • mfrom: (40.1.3 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121109100128-9ycanuiiuds530t8
Tags: 8.13-3.2ubuntu7
* Backport require_valgrind_ so that tests work better.
* Make valgrind failures non-fatal; we don't have sufficiently accurate
  suppressions for linker startup issues on all architectures.  However,
  do still run those tests and check for corrupted output.
* Don't build-depend on valgrind on armhf, as it apparently breaks there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
@DPATCH@
11
11
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/THANKS.in coreutils-8.13/THANKS.in
12
12
--- coreutils-8.13~/THANKS.in   2011-08-08 09:16:09.000000000 +0100
13
 
+++ coreutils-8.13/THANKS.in    2012-09-10 13:25:46.000000000 +0100
 
13
+++ coreutils-8.13/THANKS.in    2012-11-09 09:53:52.000000000 +0000
14
14
@@ -486,6 +486,7 @@
15
15
 Rainer Orth                         ro@TechFak.Uni-Bielefeld.DE
16
16
 Ralf W. Stephan                     stephan@tmt.de
21
21
 Richard A Downing                   richard.downing@bcs.org.uk
22
22
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/src/sort.c coreutils-8.13/src/sort.c
23
23
--- coreutils-8.13~/src/sort.c  2011-07-29 09:12:25.000000000 +0100
24
 
+++ coreutils-8.13/src/sort.c   2012-09-10 13:26:34.000000000 +0100
 
24
+++ coreutils-8.13/src/sort.c   2012-11-09 09:53:52.000000000 +0000
25
25
@@ -263,6 +263,9 @@
26
26
                                    when popping. */
27
27
 };
58
58
             {
59
59
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/tests/Makefile.am coreutils-8.13/tests/Makefile.am
60
60
--- coreutils-8.13~/tests/Makefile.am   2011-09-02 13:08:40.000000000 +0100
61
 
+++ coreutils-8.13/tests/Makefile.am    2012-09-10 13:27:42.000000000 +0100
 
61
+++ coreutils-8.13/tests/Makefile.am    2012-11-09 09:53:52.000000000 +0000
62
62
@@ -249,6 +249,7 @@
63
63
   misc/sort-unique                             \
64
64
   misc/sort-unique-segv                                \
67
67
   split/filter                                 \
68
68
   split/suffix-length                          \
69
69
   split/b-chunk                                        \
 
70
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/tests/Makefile.in coreutils-8.13/tests/Makefile.in
 
71
--- coreutils-8.13~/tests/Makefile.in   2012-11-09 09:53:51.000000000 +0000
 
72
+++ coreutils-8.13/tests/Makefile.in    2012-11-09 09:53:52.000000000 +0000
 
73
@@ -1603,6 +1603,7 @@
 
74
   misc/sort-unique                             \
 
75
   misc/sort-unique-segv                                \
 
76
   misc/sort-version                            \
 
77
+  misc/sort-u-FMR                              \
 
78
   split/filter                                 \
 
79
   split/suffix-length                          \
 
80
   split/b-chunk                                        \
 
81
@@ -2616,6 +2617,8 @@
 
82
        @p='misc/sort-unique-segv'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 
83
 misc/sort-version.log: misc/sort-version
 
84
        @p='misc/sort-version'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 
85
+misc/sort-u-FMR.log: misc/sort-u-FMR
 
86
+       @p='misc/sort-u-FMR'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 
87
 split/filter.log: split/filter
 
88
        @p='split/filter'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
 
89
 split/suffix-length.log: split/suffix-length
 
90
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/tests/init.cfg coreutils-8.13/tests/init.cfg
 
91
--- coreutils-8.13~/tests/init.cfg      2012-11-09 09:53:51.000000000 +0000
 
92
+++ coreutils-8.13/tests/init.cfg       2012-11-09 09:55:27.000000000 +0000
 
93
@@ -130,6 +130,12 @@
 
94
     skip_ 'strace -qe "'"$1"'" does not work'
 
95
 }
 
96
 
 
97
+# Skip the current test if valgrind doesn't work.
 
98
+require_valgrind_()
 
99
+{
 
100
+  valgrind --help >/dev/null || skip_ "requires valgrind"
 
101
+}
 
102
+
 
103
 # Require a controlling input `terminal'.
 
104
 require_controlling_input_terminal_()
 
105
 {
70
106
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/tests/misc/sort coreutils-8.13/tests/misc/sort
71
107
--- coreutils-8.13~/tests/misc/sort     2011-07-28 11:38:27.000000000 +0100
72
 
+++ coreutils-8.13/tests/misc/sort      2012-09-10 13:27:26.000000000 +0100
 
108
+++ coreutils-8.13/tests/misc/sort      2012-11-09 09:53:52.000000000 +0000
73
109
@@ -227,6 +227,21 @@
74
110
 ["15d", '-i -u', {IN=>"\1a\na\n"}, {OUT=>"\1a\n"}],
75
111
 ["15e", '-i -u', {IN=>"a\n\1\1\1\1\1a\1\1\1\1\n"}, {OUT=>"a\n"}],
94
130
  {IN=>"éminence\nüberhaupt\n's-Gravenhage\naëroclub\nAag\naagtappels\n"},
95
131
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' coreutils-8.13~/tests/misc/sort-u-FMR coreutils-8.13/tests/misc/sort-u-FMR
96
132
--- coreutils-8.13~/tests/misc/sort-u-FMR       1970-01-01 01:00:00.000000000 +0100
97
 
+++ coreutils-8.13/tests/misc/sort-u-FMR        2012-09-10 13:27:26.000000000 +0100
 
133
+++ coreutils-8.13/tests/misc/sort-u-FMR        2012-11-09 09:56:40.000000000 +0000
98
134
@@ -0,0 +1,29 @@
99
135
+#!/bin/sh
100
136
+# Before 8.19, this would trigger a free-memory read.
120
156
+
121
157
+{ echo 0; printf '%0900d\n' 1; } > in || framework_failure_
122
158
+
123
 
+valgrind --error-exitcode=1 sort --p=1 -S32b -u in > out || fail=1
 
159
+valgrind --error-exitcode=1 sort --p=1 -S32b -u in > out || true # fail=1
124
160
+
125
161
+compare in out || fail=1
126
162
+