Skip to content

Commit

Permalink
tests/tail: Cleanup old disabled test for warning of following indefi…
Browse files Browse the repository at this point in the history
…nitely
  • Loading branch information
Joining7943 committed Dec 3, 2022
1 parent 8463348 commit e7b6568
Showing 1 changed file with 0 additions and 55 deletions.
55 changes: 0 additions & 55 deletions tests/by-util/test_tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,61 +379,6 @@ fn test_follow_stdin_name_retry() {
}
}

#[test]
#[cfg(target_os = "linux")]
#[cfg(disable_until_fixed)]
fn test_follow_stdin_explicit_indefinitely() {
// inspired by: "gnu/tests/tail-2/follow-stdin.sh"
// tail -f - /dev/null </dev/tty
// tail: warning: following standard input indefinitely is ineffective
// ==> standard input <==

let ts = TestScenario::new(util_name!());

let mut p = ts
.ucmd()
.set_stdin(Stdio::null())
.args(&["-f", "-", "/dev/null"])
.run_no_wait();

p.make_assertion_with_delay(500).is_alive();
p.kill()
.make_assertion()
.with_all_output()
.stdout_is("==> standard input <==")
.stderr_is("tail: warning: following standard input indefinitely is ineffective");

// Also:
// $ echo bar > foo
//
// $ tail -f - -
// tail: warning: following standard input indefinitely is ineffective
// ==> standard input <==
//
// $ tail -f - foo
// tail: warning: following standard input indefinitely is ineffective
// ==> standard input <==
//
//
// $ tail -f - foo
// tail: warning: following standard input indefinitely is ineffective
// ==> standard input <==
//
// $ tail -f foo -
// tail: warning: following standard input indefinitely is ineffective
// ==> foo <==
// bar
//
// ==> standard input <==
//

// $ echo f00 | tail -f foo -
// bar
//

// TODO: Implement the above behavior of GNU's tail for following stdin indefinitely
}

#[test]
fn test_follow_bad_fd() {
// Provoke a "bad file descriptor" error by closing the fd
Expand Down

0 comments on commit e7b6568

Please sign in to comment.