<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/tail-2, branch next</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=next</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=next'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-10-02T13:00:06Z</updated>
<entry>
<title>tail: avoid a race where we could miss new data with --pid</title>
<updated>2009-10-02T13:00:06Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-10-01T07:36:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f8726e05c4ec1141fb3ffad1c9ec3838f59182cb'/>
<id>urn:sha1:f8726e05c4ec1141fb3ffad1c9ec3838f59182cb</id>
<content type='text'>
* src/tail.c (tail_forever, tail_forever_inotify): Close a race in
tail_forever_inotify where new data written after the file check by
a now dead process, but before the pid check, is not output.  We use
the POSIX guarantee that read() and write() are serialized wrt each
other even in separate processes, to assume full file consistency
after exit() and so poll for new data _after_ the writer has exited.
This also allows us to not redundantly _wait_ for new data if the
process is dead.
* tests/tail-2/pid: Remove the now partially invalid sub second sleep
check as we now don't unconditionally wait, and replace it with a check
for the redundant sleep.  Also clarify some of the existing comments.
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>tests: tail-2/pid: use a 3-second timeout, not 1</title>
<updated>2009-09-30T21:28:13Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-30T21:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=30a227673eb4b095563c0ff75c6d89a7cae5096a'/>
<id>urn:sha1:30a227673eb4b095563c0ff75c6d89a7cae5096a</id>
<content type='text'>
* tests/tail-2/pid: When using the timeout program to ensuring that
tail -s.1 --pid=$PID_T_MAX does not wait forever, use a timeout longer
than 1 second.  A 1-second timeout could be too short on a very busy
system, and result in a timeout, and hence false-positive failure.

2009-09-30  Jim Meyering  &lt;meyering@redhat.com&gt;
</content>
</entry>
<entry>
<title>tests: tail-2/assert: reduce risk of race condition</title>
<updated>2009-09-08T09:01:45Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-08T09:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e8591fd39f70932d40e9a6ddd4e607a89a3162f2'/>
<id>urn:sha1:e8591fd39f70932d40e9a6ddd4e607a89a3162f2</id>
<content type='text'>
* tests/tail2/assert: This reverts commit be853120, 25-08-2009,
"tests: tail-2/assert: avoid risk of race condition"
kill -0 doesn't send a signal and so will only confirm that the
background process was forked, which we know already because
we have its pid.
</content>
</entry>
<entry>
<title>tail: ignore -f for piped-stdin, as POSIX requires</title>
<updated>2009-09-07T21:19:56Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-07T20:10:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=af6436559c2954d7f35b7fec29dfcbaa4ebdc03b'/>
<id>urn:sha1:af6436559c2954d7f35b7fec29dfcbaa4ebdc03b</id>
<content type='text'>
* src/tail.c (main): Tailing a pipe "forever" is not useful,
and POSIX specifies that tail ignore the -f when there is no
file argument and stdin is a FIFO or pipe.  So we do that.
In addition, GNU tail excludes "-" arguments from the list of files
to tail forever, when the associated file descriptor is connected
to a FIFO or pipe.  Before this change, ":|tail -f" would hang.
Reported by Ren Yang and Ulrich Drepper.
* tests/tail-2/pipe-f: Test for this.
* tests/tail-2/pipe-f2: Ensure tail doesn't exit early for a fifo.
* tests/Makefile.am (TESTS): Add these tests.
* NEWS (POSIX conformance): Mention it.
</content>
</entry>
<entry>
<title>tests: tail-2/flush-initial should not rely on stdbuf</title>
<updated>2009-09-07T20:52:30Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-07T16:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=fd9750b0ffb691d2ad97551eada5c2802df3c805'/>
<id>urn:sha1:fd9750b0ffb691d2ad97551eada5c2802df3c805</id>
<content type='text'>
* tests/tail-2/flush-initial: stdbuf is not built on all systems.
In any case it's redundant since stdout will automatically be buffered
since we're redirecting to file. So just call tail without using stdbuf.
</content>
</entry>
<entry>
<title>tests: tail-2/infloop-1: avoid rare test failure on a busy system</title>
<updated>2009-09-07T11:55:37Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-07T09:39:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=494fed027114d63719439b399a7602f8d0384bcf'/>
<id>urn:sha1:494fed027114d63719439b399a7602f8d0384bcf</id>
<content type='text'>
* tests/tail-2/infloop-1: Sleep 3 seconds, not 1, but in increments
of 0.1 second.  Before, this test would fail ~1 time in 20 via
"make -j9 check" on a quad-core system.
Correct comment.
</content>
</entry>
<entry>
<title>tail -f: handle "-"/stdin once again</title>
<updated>2009-09-07T07:01:14Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-07T06:37:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cdfb703c5da31a798557722df516e0d01dac828a'/>
<id>urn:sha1:cdfb703c5da31a798557722df516e0d01dac828a</id>
<content type='text'>
* src/tail.c (main) [HAVE_INOTIFY]: When stdin (i.e., "-", or no args,
but not /dev/stdin) is specified on the command line, don't use inotify.
Reported by Bill Brelsford in &lt;http://bugs.debian.org/545422&gt;.
* tests/tail-2/follow-stdin: New file.  Test for this.
* tests/Makefile.am (TESTS): Add the test.
* NEWS (Bug fixes): Mention it.
This bug was introduced in coreutils-7.5 via commit ae494d4b,
2009-06-02, "tail: use inotify if it is available".
</content>
</entry>
<entry>
<title>tests: tail-2/flush-initial: correct race avoidance code</title>
<updated>2009-09-06T18:00:34Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-06T18:00:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=15f26e296b4948edc6c7d33fc1caa6cb50999364'/>
<id>urn:sha1:15f26e296b4948edc6c7d33fc1caa6cb50999364</id>
<content type='text'>
* tests/tail-2/flush-initial: Wait for the file to be nonempty,
not for the process.  Based on a suggestion from Pádraig Brady.
</content>
</entry>
<entry>
<title>tail: flush initial output before possibly blocking</title>
<updated>2009-09-06T07:40:43Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-06T07:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d54376db68adf655b5f09855442b2983fc2f4f3e'/>
<id>urn:sha1:d54376db68adf655b5f09855442b2983fc2f4f3e</id>
<content type='text'>
* src/tail.c (main): Flush any output from tail_file,
before calling tail_forever_inotify, which can block.
* tests/tail-2/flush-initial: New file.  Test for the bug.
* tests/Makefile.am (TESTS): Add tail-2/flush-initial.
* NEWS (Bug fixes): Mention it.
This bug was introduced in coreutils-7.5 via commit ae494d4b,
2009-06-02, "tail: use inotify if it is available".
</content>
</entry>
<entry>
<title>tests: test old tail -f method even on systems with inotify</title>
<updated>2009-09-05T16:19:03Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-04T20:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=526a057602f7f312443ae4ec0653fec84bca9ff2'/>
<id>urn:sha1:526a057602f7f312443ae4ec0653fec84bca9ff2</id>
<content type='text'>
* src/tail.c (main): Add an undocumented ---disable-inotify option
to allow disabling inotify.
* tests/tail-2/pid: Run test in both normal and "disable_inotify" modes.
* tests/tail-2/tail-n0f: Likewise.
* tests/tail-2/wait: Likewise.
* tests/tail-2/append-only: Likewise.
</content>
</entry>
</feed>
