Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F10151901: D2278.id5738.diff
Fri, Jun 20, 17:48
F10151890: D2278.id5740.diff
Fri, Jun 20, 17:48
F10151883: D2278.id5739.diff
Fri, Jun 20, 17:47
F10149707: D2278.diff
Fri, Jun 20, 14:40
F10149180: D2278.diff
Fri, Jun 20, 14:09
Unknown Object (File)
Sun, Jun 15, 17:16
Unknown Object (File)
Sun, Jun 15, 17:15
Unknown Object (File)
Sun, Jun 15, 11: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 Passed
Unit
Tests Passed
Branch
arcpatch-D2278
Build Status
Buildable 3539
Build 3788: arc lint + arc unit