use upstream fix the cp/proc-short-read test
This commit is contained in:
parent
788bd804ff
commit
3957dee9a4
@ -1,26 +0,0 @@
|
|||||||
From 0618c1b3b62cd68d22371b55fe6ca9dc8a00ea51 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Thu, 30 Jan 2020 14:58:37 +0100
|
|
||||||
Subject: [PATCH] tests/cp/proc-short-read.sh: skip unreliable test
|
|
||||||
|
|
||||||
Bug: https://debbugs.gnu.org/39357
|
|
||||||
---
|
|
||||||
tests/cp/proc-short-read.sh | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/tests/cp/proc-short-read.sh b/tests/cp/proc-short-read.sh
|
|
||||||
index e466720..2a61127 100755
|
|
||||||
--- a/tests/cp/proc-short-read.sh
|
|
||||||
+++ b/tests/cp/proc-short-read.sh
|
|
||||||
@@ -21,7 +21,7 @@ print_ver_ cp
|
|
||||||
|
|
||||||
kall=/proc/kallsyms
|
|
||||||
|
|
||||||
-test -r $kall || skip_ "your system lacks $kall"
|
|
||||||
+skip_ "If the content of $kall changed on the fly, this test would fail."
|
|
||||||
|
|
||||||
# Before coreutils-7.3, cp would copy less than 4KiB of this 1MB+ file.
|
|
||||||
cp $kall 1 || fail=1
|
|
||||||
--
|
|
||||||
2.21.1
|
|
||||||
|
|
54
coreutils-8.31-improve-test-cp-proc-short-read.patch
Normal file
54
coreutils-8.31-improve-test-cp-proc-short-read.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
From fb4cb651666adb43e8b332de95616e250b4d16f7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
|
||||||
|
Date: Tue, 4 Feb 2020 00:37:23 +0000
|
||||||
|
Subject: [PATCH] tests: avoid false failure due to varying /proc/kallsyms
|
||||||
|
|
||||||
|
* tests/cp/proc-short-read.sh: Switch to using /proc/cpuinfo,
|
||||||
|
rather than /proc/kallsyms which was seen to vary in some cases.
|
||||||
|
Fixes https://bugs.gnu.org/39357
|
||||||
|
|
||||||
|
Upstream-commit: ab108667ba6112efdd42f9618a1920dc9b8f6e51
|
||||||
|
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
||||||
|
---
|
||||||
|
tests/cp/proc-short-read.sh | 22 +++++++++-------------
|
||||||
|
1 file changed, 9 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/cp/proc-short-read.sh b/tests/cp/proc-short-read.sh
|
||||||
|
index 6c58881de..dcc8b30d5 100755
|
||||||
|
--- a/tests/cp/proc-short-read.sh
|
||||||
|
+++ b/tests/cp/proc-short-read.sh
|
||||||
|
@@ -19,22 +19,18 @@
|
||||||
|
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||||
|
print_ver_ cp
|
||||||
|
|
||||||
|
-kall=/proc/kallsyms
|
||||||
|
+proc_large=/proc/cpuinfo # usually > 4KiB
|
||||||
|
|
||||||
|
-test -r $kall || skip_ "your system lacks $kall"
|
||||||
|
+test -r $proc_large || skip_ "your system lacks $proc_large"
|
||||||
|
|
||||||
|
-# Before coreutils-7.3, cp would copy less than 4KiB of this 1MB+ file.
|
||||||
|
-cp $kall 1 || fail=1
|
||||||
|
-cat $kall > 2 || fail=1
|
||||||
|
-compare 1 2 || fail=1
|
||||||
|
+# Before coreutils-7.3, cp would copy less than 4KiB of this file.
|
||||||
|
+cp $proc_large 1 || fail=1
|
||||||
|
+cat $proc_large > 2 || fail=1
|
||||||
|
|
||||||
|
-# Also check md5sum, just for good measure.
|
||||||
|
-md5sum $kall > 3 || fail=1
|
||||||
|
-md5sum 2 > 4 || fail=1
|
||||||
|
+# adjust varying parts
|
||||||
|
+sed '/MHz/d; /bogomips/d;' 1 > proc.cp || framework_failure_
|
||||||
|
+sed '/MHz/d; /bogomips/d;' 2 > proc.cat || framework_failure_
|
||||||
|
|
||||||
|
-# Remove each file name before comparing checksums.
|
||||||
|
-sed 's/ .*//' 3 > sum.proc || fail=1
|
||||||
|
-sed 's/ .*//' 4 > sum.2 || fail=1
|
||||||
|
-compare sum.proc sum.2 || fail=1
|
||||||
|
+compare proc.cp proc.cat || fail=1
|
||||||
|
|
||||||
|
Exit $fail
|
||||||
|
--
|
||||||
|
2.21.1
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Summary: A set of basic GNU tools commonly used in shell scripts
|
Summary: A set of basic GNU tools commonly used in shell scripts
|
||||||
Name: coreutils
|
Name: coreutils
|
||||||
Version: 8.31
|
Version: 8.31
|
||||||
Release: 8%{?dist}
|
Release: 9%{?dist}
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Url: https://www.gnu.org/software/coreutils/
|
Url: https://www.gnu.org/software/coreutils/
|
||||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
||||||
@ -16,8 +16,8 @@ Source106: coreutils-colorls.csh
|
|||||||
# md5sum,b2sum,sha*sum: --help: add note about binary/text mode
|
# md5sum,b2sum,sha*sum: --help: add note about binary/text mode
|
||||||
Patch1: coreutils-8.31-sums-man-pages.patch
|
Patch1: coreutils-8.31-sums-man-pages.patch
|
||||||
|
|
||||||
# skip a test that relies on /proc/kallsyms having immutable content
|
# improve an upstream test that relied on /proc/kallsyms being immutable
|
||||||
Patch2: coreutils-8.31-disable-test-cp-proc-short-read.patch
|
Patch2: coreutils-8.31-improve-test-cp-proc-short-read.patch
|
||||||
|
|
||||||
# disable the test-lock gnulib test prone to deadlock
|
# disable the test-lock gnulib test prone to deadlock
|
||||||
Patch100: coreutils-8.26-test-lock.patch
|
Patch100: coreutils-8.26-test-lock.patch
|
||||||
@ -238,6 +238,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|||||||
%license COPYING
|
%license COPYING
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 05 2020 Kamil Dudka <kdudka@redhat.com> - 8.31-9
|
||||||
|
- use upstream fix the cp/proc-short-read test
|
||||||
|
|
||||||
* Thu Jan 30 2020 Kamil Dudka <kdudka@redhat.com> - 8.31-8
|
* Thu Jan 30 2020 Kamil Dudka <kdudka@redhat.com> - 8.31-8
|
||||||
- skip a test that relies on /proc/kallsyms having immutable content
|
- skip a test that relies on /proc/kallsyms having immutable content
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user