Skip to content

Commit

Permalink
tests: fix sched_realtime integration test broken with Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Jan 17, 2025
1 parent b486593 commit 4fa9d25
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tests/cl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,7 @@ fn run_sched_realtime() {
.success()
.stdout(predicate::str::contains("ProtectSystem=strict\n").count(1))
.stdout(predicate::str::contains("ProtectHome=read-only\n").count(1))
.stdout(if !Uid::effective().is_root() && env::current_exe().unwrap().starts_with("/tmp") {
BoxPredicate::new(predicate::str::contains("PrivateTmp=").count(0))
} else {
BoxPredicate::new(predicate::str::contains("PrivateTmp=true\n").count(1).or(predicate::str::contains("PrivateTmp=disconnected\n").count(1)))
})
// Python 3.13 for some reason reads the parent script, which is running under /tmp and breaks PrivateTmp
.stdout(predicate::str::contains("PrivateDevices=true\n").count(1))
.stdout(predicate::str::contains("ProtectKernelTunables=true\n").count(1))
.stdout(predicate::str::contains("ProtectKernelModules=true\n").count(1))
Expand All @@ -478,11 +474,7 @@ fn run_sched_realtime() {
.success()
.stdout(predicate::str::contains("ProtectSystem=strict\n").count(1))
.stdout(predicate::str::contains("ProtectHome=read-only\n").count(1))
.stdout(if !Uid::effective().is_root() && env::current_exe().unwrap().starts_with("/tmp") {
BoxPredicate::new(predicate::str::contains("PrivateTmp=").count(0))
} else {
BoxPredicate::new(predicate::str::contains("PrivateTmp=true\n").count(1).or(predicate::str::contains("PrivateTmp=disconnected\n").count(1)))
})
// Python 3.13 for some reason reads the parent script, which is running under /tmp and breaks PrivateTmp
.stdout(predicate::str::contains("PrivateDevices=true\n").count(1))
.stdout(predicate::str::contains("ProtectKernelTunables=true\n").count(1))
.stdout(predicate::str::contains("ProtectKernelModules=true\n").count(1))
Expand Down

0 comments on commit 4fa9d25

Please sign in to comment.