svn commit: r309109 - head/lib/libutil

Ed Maste emaste at freebsd.org
Sat Nov 26 01:31:10 UTC 2016


On 24 November 2016 at 14:39, Dag-Erling Smørgrav <des at des.no> wrote:
>
> Precisely.  If memory serves, I wrote that comment after receiving a
> patch from someone who made the same mistake that I had already made and
> reverted *twice*.  It's the logical, sane thing to do: replace a BSD
> primitive with the equivalent POSIX primitive, except the latter has
> subtly different semantics and works in some of flopen(3)'s typical use
> cases, but not all, and crucially, not in the pidfile(3) case.

In other words, nobody else has changed this code, and in one case
where someone proposed a broken patch they did it by contacting you
directly. This seems like exactly the desired behaviour, without
needing any warning in the code. The comment added in r309109 hardly
seems appropriate for this case, especially given that the revision
history doesn't offer much insight. Please rephrase the comment to
explain instead why the "obvious" improvements are not appropriate.

> I just remembered that I wrote a unit test for flopen(3).  So maybe the
> comment is redundant...  if you assume that people build and run the
> tests, and I'm willing to bet that they don't, because our test
> framework is not very developer-friendly.

I share your frustration with the lack of developer friendliness in
our tests. But running the test suite must be a part of the release
checklist and if the test detects a regression here our process must
prevent it from making it into a release.


More information about the svn-src-all mailing list