Re: Testing root-only features hga@xxxxxx 16 Sep 2020 11:04 UTC
> From: Lassi Kortela <xxxxxx@lassi.io> > Date: Wednesday, September 16, 2020 2:28 AM > > [...] > >>> Perhaps you could split the tests into two groups: one that requires >>> root and one that doesn't. That way, people without root rights could >>> at least run some of the tests. >> >> Rather than that, since this is a POSIX SRFI with a user-effective-uid >> procedure, I just conditionalize the tests based on it being 0 or not. > > Good ideas. Not sure which is the better way to do it. > >> The only tricky bit is that for debugging purposes the set of small >> files is left after a test run and deleted before beginning a new one, >> so before you switch back to being a non-privileged user you need to >> manually delete them. > > Is there a particular reason the test suite cleanup code can't delete > the temp files? So that if a filesystem related test blows up, you might be able to figure out the problem by looking at the test directory. It's only a problem in this special case of running as root, and I figure that's sufficiently involved adding this extra burden is not a major problem. - Harold