[Toybox] tests/losetup.test

Rob Landley rob at landley.net
Mon Dec 4 22:34:42 PST 2017


On 12/04/2017 05:18 PM, enh wrote:
> not sure what's meant to be going on in this file, but it looks wrong
> in several ways.

Sigh, that shouldn't have been checked in.  (I need tests/pending.)

The theory here is that I use a known qemu testing environment (ala
mkroot) to run tests in an environment that supplies specific things
(like the "dummy" ethernet driver), which doesn't are about damage from
failed tests that don't clean up after themselves, and isn't perturbed
by whatever else the system might be doing. (On an emulated system I can
reach out and grap /dev/loop1 by name. On a real system, it might be in
use.)

This is actually a surprisingly pervasive problem testing-wise, because
if I want to test that rm -rf will go 2xPATH_MAX subdirectories deep, I
don't want to worry about failures due to inode exhaustion or leaving
something that the host's rm -rf might not be able to clear out either.
Do it in an initmpfs, the qemu instance exits and it goes byebye.

But yeah, the current one is pointless. Lemme see what I can do on my
flight back to Austin...

Rob



More information about the Toybox mailing list