Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
F58026345: D2278.id5739.diff
Wed, Nov 25, 13:12
F58020293: D2278.id5737.diff
Wed, Nov 25, 10:32
Unknown Object (File)
Mon, Nov 23, 10:14
Unknown Object (File)
Sat, Nov 21, 14:57
Unknown Object (File)
Sat, Nov 21, 07:44
Unknown Object (File)
Wed, Nov 18, 11:27
Unknown Object (File)
Fri, Nov 13, 06:34
Unknown Object (File)
Thu, Nov 12, 03:00
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