HomeDevCentral

Detect when test suite runs with privileged access

Description

Detect when test suite runs with privileged access

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

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D2278

Details

Provenance
derecksonAuthored on Mar 11 2020, 19:54
derecksonPushed on Feb 19 2022, 22:15
Parents
rKERUALDf3d54d97b9c8: Allow to create an arbitrary length ASCII identifier
Branches
Unknown
Tags
Unknown
References
tag: omnitools/0.3.0

Event Timeline