Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F24762497: D2278.diff
Mon, Mar 9, 15:51
F24762253: D2278.id5739.diff
Mon, Mar 9, 15:48
F24757501: D2278.id5737.diff
Mon, Mar 9, 11:57
F24755055: D2278.id5740.diff
Mon, Mar 9, 10:15
F24745331: D2278.id5741.diff
Sun, Mar 8, 18:23
Unknown Object (File)
Thu, Mar 5, 22:32
Unknown Object (File)
Mon, Mar 2, 00:16
Unknown Object (File)
Fri, Feb 27, 14:08
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