Fixed pcre-count test on secondary architectures
(byt test-pcre-count-fix patch) Resolves: rhbz#1296842
This commit is contained in:
parent
c8514cce19
commit
f1be6b4c72
26
grep-2.22-test-pcre-count-fix.patch
Normal file
26
grep-2.22-test-pcre-count-fix.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/tests/pcre-count b/tests/pcre-count
|
||||
--- a/tests/pcre-count
|
||||
+++ b/tests/pcre-count
|
||||
@@ -13,11 +13,17 @@ require_pcre_
|
||||
|
||||
fail=0
|
||||
|
||||
-printf 'a\n%032768d\nb\x0\n%032768d\na\n' 0 0 > in
|
||||
+printf 'a\n%032768d\nb\0\n%032768d\na\n' 0 0 > in || framework_failure_
|
||||
|
||||
-LC_ALL=C grep -P 'a' in | wc -l > exp
|
||||
+# grep will discover that the input is a binary file sooner if the
|
||||
+# page size is larger, so allow for either possible output.
|
||||
+printf 'a\nBinary file in matches\n' >exp1a || framework_failure_
|
||||
+printf 'Binary file in matches\n' >exp1b || framework_failure_
|
||||
+LC_ALL=C grep -P 'a' in >out || fail=1
|
||||
+compare exp1a out || compare exp1b out || fail=1
|
||||
|
||||
-LC_ALL=C grep -Pc 'a' in > out || fail=1
|
||||
-compare exp out || fail=1
|
||||
+printf '2\n' >exp2 || framework_failure_
|
||||
+LC_ALL=C grep -Pc 'a' in >out || fail=1
|
||||
+compare exp2 out || fail=1
|
||||
|
||||
Exit $fail
|
||||
|
10
grep.spec
10
grep.spec
@ -3,7 +3,7 @@
|
||||
Summary: Pattern matching utilities
|
||||
Name: grep
|
||||
Version: 2.22
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv3+
|
||||
URL: http://www.gnu.org/software/grep/
|
||||
Group: Applications/Text
|
||||
@ -26,6 +26,8 @@ Patch2: grep-2.22-disable-performance-related-tests.patch
|
||||
Patch3: grep-2.22-better-encoding-errors-handling.patch
|
||||
# backported from upstream, upstream bug#22028
|
||||
Patch4: grep-2.22-Pc-consistent-results.patch
|
||||
# backported from upstream, upstream bug#22350
|
||||
Patch5: grep-2.22-test-pcre-count-fix.patch
|
||||
Requires(post): /sbin/install-info
|
||||
Requires(preun): /sbin/install-info
|
||||
|
||||
@ -48,6 +50,7 @@ GNU grep is needed by many scripts, so it shall be installed on every system.
|
||||
%patch2 -p1 -b .disable-performance-related-tests
|
||||
%patch3 -p1 -b .better-encoding-errors-handling
|
||||
%patch4 -p1 -b .Pc-consistent-results
|
||||
%patch5 -p1 -b .test-pcre-count-fix
|
||||
|
||||
chmod 755 tests/encoding-error
|
||||
chmod 755 tests/pcre-count
|
||||
@ -101,6 +104,11 @@ fi
|
||||
%{_libexecdir}/grepconf.sh
|
||||
|
||||
%changelog
|
||||
* Tue Jan 12 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.22-6
|
||||
- Fixed pcre-count test on secondary architectures
|
||||
(byt test-pcre-count-fix patch)
|
||||
Resolves: rhbz#1296842
|
||||
|
||||
* Wed Jan 6 2016 Jaroslav Škarvada <jskarvad@redhat.com> - 2.22-5
|
||||
- Used latest upstream patch for bug 1269014 to fix regression,
|
||||
fixed order of patches
|
||||
|
Loading…
Reference in New Issue
Block a user