freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

newsyslog: Add tests for rotating files based on size

Open bdesham opened this issue 7 months ago • 2 comments

The tests for newsyslog(8) did not previously test size-based rotation, e.g., “rotate foo.log once it becomes larger than 8 KB.” This pull request adds a few tests for this functionality.

bdesham avatar May 19 '25 19:05 bdesham

@asomers I’m happy to revise this, but I’m not very familiar with FreeBSD’s testing infrastructure. Are you requesting that I rewrite the tests in C specifically? I would feel a lot more comfortable rewriting them as an ATF shell script (like usr.sbin/sysrc/tests/sysrc_test.sh, just to pick a concrete example).

bdesham avatar May 29 '25 17:05 bdesham

@asomers I’m happy to revise this, but I’m not very familiar with FreeBSD’s testing infrastructure. Are you requesting that I rewrite the tests in C specifically? I would feel a lot more comfortable rewriting them as an ATF shell script (like usr.sbin/sysrc/tests/sysrc_test.sh, just to pick a concrete example).

I think Alan is just asking for new tests to use the ATF framework, so atf-sh is perfectly reasonable. The existing newsyslog tests don't use ATF only because they predate it.

markjdb avatar Jul 25 '25 17:07 markjdb