On Fri, Feb 08, 2019 at 12:49:59PM -0500, Randall S. Becker wrote: > > We did discuss this at the time of the patch, but it seems we already use > > /dev/zero in a bunch of places: > > > > https://public-inbox.org/git/xmqqbm57rkg5.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx/ > > > > Were you just skipping the other tests before? > > I did not catch the implications of the review at the time - my bad. We were not intentionally skipping the tests. It looks like some are automatically skipped. t4153 automatically skips (missing TTY), and t5562 fails also but for a different reason (hang - we don't have apache2 to serve up http content). > > Would you object to something like this: > > if [ ! -e /dev/zero ]; then > # use shred or some other mechanism (still trying to figure out a solution) > else > # existing dd > fi That's fine, as long as it's wrapped up in a function in order to keep the tests readable. Though I suspect we may be able to just find a solution that works everywhere, without having two different implementations. If we know we need $count bytes for dd, we could probably just generate a file with that many NULs in it. Other cases don't seem to actually care that they're getting NULs, and are just redirecting stdin from /dev/zero to get an infinite amount of input. They could probably use "yes" for that. -Peff