Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F7924718: D2278.id5741.diff
Mon, May 5, 08:33
F7924597: D2278.id5737.diff
Mon, May 5, 08:30
F7915863: D2278.id5741.diff
Mon, May 5, 05:04
F7915798: D2278.id5740.diff
Mon, May 5, 05:02
F7915728: D2278.id5737.diff
Mon, May 5, 05:01
F7915722: D2278.id5739.diff
Mon, May 5, 05:01
F7912973: D2278.id5738.diff
Mon, May 5, 03:56
F7912883: D2278.id5740.diff
Mon, May 5, 03:53
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