Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F12076184: D2278.id5740.diff
Thu, Oct 2, 15:19
F12076183: D2278.id5738.diff
Thu, Oct 2, 15:19
F12076134: D2278.id5737.diff
Thu, Oct 2, 15:00
F12076133: D2278.id5739.diff
Thu, Oct 2, 15:00
F12076131: D2278.id5740.diff
Thu, Oct 2, 15:00
F12076124: D2278.id5741.diff
Thu, Oct 2, 14:59
F12076123: D2278.id5738.diff
Thu, Oct 2, 14:59
F12075953: D2278.diff
Thu, Oct 2, 13:43
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 3538
Build 3787: arc lint + arc unit