We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0e1935 commit 0fa7948Copy full SHA for 0fa7948
test/test_unistd.rs
@@ -387,13 +387,30 @@ fn test_lseek64() {
387
close(tmpfd).unwrap();
388
}
389
390
+cfg_if!{
391
+ if #[cfg(any(target_os = "android", target_os = "linux"))] {
392
+ macro_rules! require_acct{
393
+ () => {
394
+ require_capability!(CAP_SYS_PACCT);
395
+ }
396
397
+ } else {
398
399
400
+ skip_if_not_root!("test_acct");
401
402
403
404
+}
405
+
406
#[test]
407
fn test_acct() {
408
use tempfile::NamedTempFile;
409
use std::process::Command;
410
use std::{thread, time};
411
- skip_if_not_root!("test_acct");
412
+ require_acct!();
413
414
let file = NamedTempFile::new().unwrap();
415
let path = file.path().to_str().unwrap();
416
0 commit comments