Subject: Re: [PATCH 2/3] tests: store-roots: Initial gc-roots should be empty.

From: Josselin Poiret <[email-masked]>
Date: Fri, 28 Jul 2023 16:00:24 +0200

Hi everyone,

Janneke Nieuwenhuizen <[email-masked]> writes:

> Just a headsup that this change breaks the store-roots test on the hurd
> for me.

Thanks for the feedback Janneke.  It seems that there is some left-over
state that can mess with this state's result: I was initially surprised
that the /profiles directory could appear in the gc roots, but that's
because it is symlinked under /gcroots, not because it is itself
searched for gc roots.

In any case, the /gcroots directory along with the /gcroots/profiles
symlink is created when a connection is made to the daemon, which is not
the case here yet.  However, a connection might have been opened before
for the same state dir (which depends on the PID of
build-aux/test-env.in).  It might also depend on whether the clean-up of
the state directory made by `trap` worked and whether PIDs get re-used
quickly on the specific kernel.  I think this is all too unreliable
here (I have one such example of a leftover PID state dir in my tree, so
it might happen more often than not).

In any case, if this test is only here to check if gc-roots doesn't
error out, we could return #t at the end to only fish for errors.  WDYT?

Best,
-- 
Josselin Poiret