All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Alcock <nix@esperi.org.uk>
To: ealmorshdy@d-matrix.ai
Cc: dtrace@lists.linux.dev, Kris Van Hees <kris.van.hees@oracle.com>
Subject: Re: [PATCH v2 2/2] test: add test for system daemons with regular files as streams
Date: Thu, 19 Nov 2026 12:51:51 +0000	[thread overview]
Message-ID: <875wxtm1aw.fsf@esperi.org.uk> (raw)
In-Reply-To: <20261119-b4-bug008-daemon-readlink-v2-2-c4bc5fbf156f@d-matrix.ai>

On 19 Nov 2026, Eslam Almorshdy via stated:

> Start a root process without a terminal with its stdout to a regular
> file outside /var, then to one under /var, and check how libproc
> classifies it from DTRACE_DEBUG: not a system daemon, then a system
> daemon.
>
> libproc asks systemd whenever /run/systemd/system exists, and for a
> process in a systemd slice the slice decides.  So on a systemd system
> the test runs dtrace under unshare -m, in a mount namespace of its own
> with a tmpfs over /run/systemd: libproc does not find systemd and uses
> the rules under test.

Oh that's cunning. Finally we can routinely test non-systemd codepaths
everywhere!

It might be easier just to always run it in such a mount namespace, but
other than that...

> Signed-off-by: Eslam Almorshdy <ealmorshdy@d-matrix.ai>

Test LGTM.

Reviewed-by: Nick Alcock <nix@esperi.org.uk>

      reply	other threads:[~2026-11-19 12:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  7:11 [PATCH v2 0/2] Fix a readlink() typo in Psystem_daemon() Eslam Almorshdy via B4 Relay
2026-11-19  7:11 ` Eslam Almorshdy
2026-11-19  7:11 ` [PATCH v2 1/2] libproc: fix " Eslam Almorshdy via B4 Relay
2026-11-19  7:11   ` Eslam Almorshdy
2026-11-19 12:48   ` Nick Alcock
2026-11-19  7:11 ` [PATCH v2 2/2] test: add test for system daemons with regular files as streams Eslam Almorshdy via B4 Relay
2026-11-19  7:11   ` Eslam Almorshdy
2026-11-19 12:51   ` Nick Alcock [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875wxtm1aw.fsf@esperi.org.uk \
    --to=nix@esperi.org.uk \
    --cc=dtrace@lists.linux.dev \
    --cc=ealmorshdy@d-matrix.ai \
    --cc=kris.van.hees@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.