Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F2826204: D2278.id5738.diff
Thu, Apr 18, 19:15
F2825706: D2278.diff
Thu, Apr 18, 17:08
Unknown Object (File)
Mon, Apr 15, 15:30
Unknown Object (File)
Mon, Apr 15, 15:30
Unknown Object (File)
Sun, Apr 14, 22:10
Unknown Object (File)
Thu, Apr 11, 15:30
Unknown Object (File)
Thu, Apr 11, 15:21
Unknown Object (File)
Wed, Apr 10, 18:14
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