[LTP] [RFC] 'nobody' user for testing

Petr Vorel pvorel@suse.cz
Thu Oct 16 15:09:52 CEST 2025


> Hi!
> > Short term solution will be Jan's suggestion to write simple "sudo" binary or
> > even just let testers to fix the setup (i.e. fix it for us in openQA).

> I guess that having a small helper to execute commands as a selected
> user would be reasonable. We already have tst_sleep because the sleep
> commands in different shells behaves differently.

> Adding tst_sudo that would take an user and command to execute does make
> sense here I suppose. 

OK, I can write it unless Jan plans to work on it (Jan, please let me know).

I propose to have the usual LTP approach to have functionality used by C API
(e.g. lib/tst_sudo.c) and reused by thin wrapper available for shell API
(testcases/lib/tst_sudo.c).

Few C API tests would use it (prctl06 and other mentioned previously [1] as 3)),
in shell API only these 2 IMA tests.

> And I think that the question if we need a separate user for LTP testing is
> orthogonal.

Agree. I just brought these two topics together as they are related.
So, as a separate topic/effort, do you see any room for C API functions for 1)
and 2) in [1]?

Kind regards,
Petr

[1] https://lore.kernel.org/ltp/20251006094837.GC66983@pevik/


More information about the ltp mailing list