On 2024-08-05 15:55, Simon McVittie wrote:
> On Mon, 05 Aug 2024 at 14:52:04 +0200, Paride Legovini wrote:
>> On doing 2>/dev/null, I believe that a-v-unshare runs tests without a
>> populated /dev
> 
> If true, then that's an important bug in a-v-unshare. Our testbeds
> should all be tolerably realistic systems that meet the minimum "API"
> requirements for a reasonable Debian chroot/container.

OK, what I said is not really true: autopkgtest-virt-unshare does this:

https://salsa.debian.org/ci-team/autopkgtest/-/blob/30c9c0a589aa49bc86649b825b29a1be647d8c26/virt/autopkgtest-virt-unshare#L128

and it is during that early useradd call that /dev/null does not exist.
(I know because this causes issues in Ubuntu, with its patched useradd
assuming /dev/null exists.)

For the actual test run, unshare-helper takes care of creating /dev/null
and others:

https://salsa.debian.org/ci-team/autopkgtest/-/blob/30c9c0a589aa49bc86649b825b29a1be647d8c26/virt/autopkgtest-virt-unshare#L141

So: no need to worry about >/dev/null redirects in create-normal-user.

--
Paride

Reply via email to