Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F7857001: D2278.diff
Sun, May 4, 03:44
Unknown Object (File)
Mon, Apr 28, 20:28
Unknown Object (File)
Mon, Apr 28, 16:02
Unknown Object (File)
Thu, Apr 24, 00:33
Unknown Object (File)
Mon, Apr 21, 09:18
Unknown Object (File)
Mon, Apr 21, 04:07
Unknown Object (File)
Sun, Apr 20, 22:45
Unknown Object (File)
Sun, Apr 20, 21:55
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