Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F54438859: D2278.id5739.diff
Mon, Oct 19, 02:48
F54438858: D2278.id5738.diff
Mon, Oct 19, 02:48
F54438850: D2278.id5737.diff
Mon, Oct 19, 02:48
F54438847: D2278.id5740.diff
Mon, Oct 19, 02:48
F54438844: D2278.id5741.diff
Mon, Oct 19, 02:48
F54429841: D2278.diff
Sun, Oct 18, 23:19
Unknown Object (File)
Tue, Oct 13, 21:04
Unknown Object (File)
Tue, Oct 13, 08:18
Subscribers
None

Details

Summary

When the test suite runs as root under Linux or FreeBSD,
or with elevated status ('runs as administrator') on Windows,
the process can see normally non-readable files.

As such, we skip the relevant tests.

Test Plan
  • Windows: runs in a regular console and a privileged console
  • Debian: runs as root, and with sudo -u nobody phpunit
  • FreeBSD: runs trim(shell_exec('id -u')) with psysh

Diff Detail

Repository
rKOT Keruald OmniTools
Lint
Lint Not Applicable
Unit
Tests Not Applicable