Skip to content
Myr

Merge pull request #1217 from tmccombs/skip-executable-test-if-root

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Skip an executable test if running as root

authored by David Peter · committed by GitHub · parents 7c86c7d, a36f2cf · Browse files · 1 file+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−0 removed

  • tests:+7 added−0 removed

1 file+7 added−0 removed

modified:tests/tests.rs+7 added
1200 unmodified lines
1201#[test]1202fn test_type_executable() {1203 use std::os::unix::fs::OpenOptionsExt;12041205 // This test assumes the current user isn't root1206 // (otherwise if the executable bit is set for any level, it is executable for the current1207 // user)1208 if users::get_current_uid() == 0 {1209 return;1210 }12111212 let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);12131214 fs::OpenOptions::new()1215 .create(true)
1230 unmodified lines