Page MenuHomeDevCentral

Detect when test suite runs with privileged access
ClosedPublic

Authored by dereckson on Mar 11 2020, 14:42.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 6, 15:28
Unknown Object (File)
Sat, Apr 25, 01:22
Unknown Object (File)
Fri, Apr 24, 21:57
Unknown Object (File)
Fri, Apr 24, 13:32
Unknown Object (File)
Wed, Apr 22, 07:06
Unknown Object (File)
Sun, Apr 12, 21:46
Unknown Object (File)
Thu, Apr 9, 18:07
Unknown Object (File)
Thu, Apr 9, 07:03
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