From 743a325885521a01dfb5ea1a86d0812f60f12683 Mon Sep 17 00:00:00 2001 From: Jan Scheer Date: Thu, 16 Jun 2022 14:05:28 +0200 Subject: [PATCH] Revert "test_tail: pid.sh: replace timeout with system timeout" This reverts commit 3f83cf97bd24b94aa2628c94383ca00bc328fe50. --- src/uu/tail/src/tail.rs | 4 ++-- tests/by-util/test_tail.rs | 2 +- util/build-gnu.sh | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/uu/tail/src/tail.rs b/src/uu/tail/src/tail.rs index 74fd04033e1..2007c47c0a4 100644 --- a/src/uu/tail/src/tail.rs +++ b/src/uu/tail/src/tail.rs @@ -1547,10 +1547,10 @@ impl MetadataExtTail for Metadata { } } - fn file_id_eq(&self, _other: &Metadata) -> bool { + fn file_id_eq(&self, other: &Metadata) -> bool { #[cfg(unix)] { - self.ino().eq(&_other.ino()) + self.ino().eq(&other.ino()) } #[cfg(windows)] { diff --git a/tests/by-util/test_tail.rs b/tests/by-util/test_tail.rs index 6bef1d4e615..155aa6967f1 100644 --- a/tests/by-util/test_tail.rs +++ b/tests/by-util/test_tail.rs @@ -1738,7 +1738,7 @@ fn test_follow_name_truncate1() { } #[test] -#[cfg(target_os = "linux")] // FIXME: fix this test for BSD/macOS +#[cfg(unix)] fn test_follow_name_truncate2() { // This test triggers a truncate event while `tail --follow=name file` is running. // $ ((sleep 1 && echo -n "x\nx\nx\n" >> file && sleep 1 && \ diff --git a/util/build-gnu.sh b/util/build-gnu.sh index b795e7e5b61..e04165e6913 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -142,7 +142,6 @@ sed -i 's|ln -|/usr/bin/ln -|' tests/cp/link-deref.sh sed -i 's|cp |/usr/bin/cp |' tests/mv/hard-2.sh sed -i 's|paste |/usr/bin/paste |' tests/misc/od-endian.sh sed -i 's|timeout |/usr/bin/timeout |' tests/tail-2/follow-stdin.sh -sed -i 's|timeout |/usr/bin/timeout |' tests/tail-2/pid.sh # Add specific timeout to tests that currently hang to limit time spent waiting sed -i 's|\(^\s*\)seq \$|\1/usr/bin/timeout 0.1 seq \$|' tests/misc/seq-precision.sh tests/misc/seq-long-double.sh