Skip to content

Commit b3a0d69

Browse files
author
aweinstock
committed
uucore: Update tests for realtime signals.
1 parent 4e2a13b commit b3a0d69

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/uucore/src/lib/features/signals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ pub fn signal_by_name_or_value(signal_name_or_value: &str) -> Option<usize> {
410410
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
411411
/// Parses signals of the form RTMIN(+[0-9]\+)?|RTMAX(-[0-9]\+)?
412412
fn try_parse_sigrt(signal_name: &str) -> Option<usize> {
413-
if crate::os::is_wsl() {
413+
if realtime_signal_bounds().is_none() {
414414
return None;
415415
}
416416
if let Some(rest) = signal_name.strip_prefix("RTMIN") {

tests/by-util/test_kill.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ fn test_kill_signal_only_no_pid() {
497497
#[test]
498498
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
499499
fn test_kill_with_signal_sigrt() {
500-
if !uucore::os::is_wsl() {
500+
if realtime_signal_bounds().is_some() {
501501
for signal in &["SIGRTMIN", "SIGRTMIN+1", "SIGRTMAX", "SIGRTMAX-1"] {
502502
let target = Target::new();
503503
new_ucmd!()

tests/by-util/test_timeout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn test_foreground_signal0_kill_after() {
290290
#[test]
291291
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
292292
fn test_timeout_sigrt() {
293-
if !uucore::os::is_wsl() {
293+
if realtime_signal_bounds().is_some() {
294294
new_ucmd!()
295295
.args(&["-s", "SIGRTMIN", "0.1", "sleep", "2"])
296296
.succeeds();

0 commit comments

Comments
 (0)