coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

two portability fixes


From: Jim Meyering
Subject: two portability fixes
Date: Fri, 04 Feb 2011 15:04:24 +0100

The first is just to fix a failing test.
For mv/i-3, the output file, "out" is empty on FreeBSD 8.1
Also, (and this is telling), it seems that no one is testing
on non-linux kernels.  On the first one I tried, just before
I was planning to release, "make check" reported 30+ failing tests,
all having to do with the new copying code.

>From ee74c7d36ddfc3758b2cdec540aab478eb724572 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 4 Feb 2011 14:59:03 +0100
Subject: [PATCH 1/2] tests: skip mv/i-3 on FreeBSD to avoid spurious failure

* tests/mv/i-3: Skip when uname -s reports FreeBSD.
---
 tests/mv/i-3 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/mv/i-3 b/tests/mv/i-3
index 80db5e8..7fba139 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -23,6 +23,8 @@ require_controlling_input_terminal_
 skip_if_root_
 trap '' TTIN # Ignore SIGTTIN

+test "$(uname -s)" = FreeBSD && skip_ "known spurious failure on FreeBSD"
+
 touch f g h i || framework_failure
 chmod 0 g i || framework_failure

--
1.7.4.2.g597a6


>From d5fa424a9c25db98619c47007f548aaef6155fce Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 4 Feb 2011 15:01:39 +0100
Subject: [PATCH 2/2] cp: avoid spurious failure on any non-linux kernel

* src/extent-scan.c (extent_scan_read) [!linux]: Always set
scan->initial_scan_failed so caller knows not to report the failure.
---
 src/extent-scan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/extent-scan.c b/src/extent-scan.c
index 9f38877..1ba59db 100644
--- a/src/extent-scan.c
+++ b/src/extent-scan.c
@@ -110,6 +110,7 @@ extent_scan_read (struct extent_scan *scan)
 extern bool
 extent_scan_read (struct extent_scan *scan ATTRIBUTE_UNUSED)
 {
+  scan->initial_scan_failed = true;
   errno = ENOTSUP;
   return false;
 }
--
1.7.4.2.g597a6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]