Skip to content

Commit

Permalink
test_tail: pid.sh: replace timeout with system timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jhscheer committed Jun 16, 2022
1 parent aa369bb commit 3f83cf9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/uu/tail/src/tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
{
Expand Down
2 changes: 1 addition & 1 deletion tests/by-util/test_tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ fn test_follow_name_truncate1() {
}

#[test]
#[cfg(unix)]
#[cfg(target_os = "linux")] // FIXME: fix this test for BSD/macOS
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 && \
Expand Down
1 change: 1 addition & 0 deletions util/build-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ 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
Expand Down

0 comments on commit 3f83cf9

Please sign in to comment.