Email list hosting service & mailing list manager

SRFI 170 file-space -> filesystem-space ?? hga@xxxxxx (15 Sep 2020 13:39 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? John Cowan (15 Sep 2020 15:56 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? Lassi Kortela (15 Sep 2020 16:36 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? Lassi Kortela (15 Sep 2020 16:41 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? hga@xxxxxx (15 Sep 2020 17:07 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? Lassi Kortela (15 Sep 2020 17:16 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? John Cowan (15 Sep 2020 17:17 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? hga@xxxxxx (15 Sep 2020 19:02 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? Lassi Kortela (15 Sep 2020 19:31 UTC)
A Lisp programmer walks into a room Lassi Kortela (15 Sep 2020 19:42 UTC)
Re: A Lisp programmer walks into a room Arthur A. Gleckler (15 Sep 2020 20:53 UTC)
Re: A Lisp programmer walks into a room Marc Nieper-Wi├čkirchen (15 Sep 2020 20:57 UTC)
Re: A Lisp programmer walks into a room John Cowan (15 Sep 2020 21:11 UTC)
Re: A Lisp programmer walks into a room Lassi Kortela (15 Sep 2020 21:40 UTC)
Re: A Lisp programmer walks into a room Lassi Kortela (15 Sep 2020 21:52 UTC)
Re: A Lisp programmer walks into a room Arthur A. Gleckler (15 Sep 2020 22:15 UTC)
Re: A Lisp programmer walks into a room Lassi Kortela (15 Sep 2020 22:44 UTC)
Re: A Lisp programmer walks into a room hga@xxxxxx (15 Sep 2020 21:54 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? hga@xxxxxx (15 Sep 2020 21:27 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? Arthur A. Gleckler (15 Sep 2020 22:13 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? hga@xxxxxx (15 Sep 2020 22:29 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? Arthur A. Gleckler (15 Sep 2020 22:32 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? hga@xxxxxx (15 Sep 2020 22:40 UTC)
Testing root-only features Lassi Kortela (16 Sep 2020 07:28 UTC)
Re: Testing root-only features Lassi Kortela (16 Sep 2020 07:31 UTC)
Re: Testing root-only features hga@xxxxxx (16 Sep 2020 11:04 UTC)
Re: SRFI 170 file-space -> filesystem-space ?? John Cowan (15 Sep 2020 20:01 UTC)

Testing root-only features Lassi Kortela 16 Sep 2020 07:28 UTC

Unix system calls are generally called via wrapper functions in libc.
There are several C libraries that override these wrapper functions with
ones that have custom behavior, such as pretending to be root or
pretending that the file system has different files than it actually
does. As one of many examples, an open() wrapper can do its own pathname
translation before opening the file.

These are called LD_PRELOAD hacks. LD_PRELOAD is an environment variable
that lets you inject libraries (.so) which the OS will load when
starting new processes with a higher precedence than the usual
libraries.
<https://stackoverflow.com/questions/426230/what-is-the-ld-preload-trick>

A tool called "pseudo"
(https://packages.debian.org/stable/source/pseudo) may be the most
popular one of this type.

>> 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?