From 8ac72a77c97bdef03a13540908d89d7815a3c281 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Tue, 19 May 2026 16:53:42 +0900 Subject: [PATCH] tests_tail.rs: remove nix --- tests/by-util/test_tail.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/by-util/test_tail.rs b/tests/by-util/test_tail.rs index 77bc9663529..3cd85d28c22 100644 --- a/tests/by-util/test_tail.rs +++ b/tests/by-util/test_tail.rs @@ -13,23 +13,16 @@ clippy::cast_possible_truncation )] +use pretty_assertions::assert_eq; +use rand::distr::Alphanumeric; +use rstest::rstest; #[cfg(all( not(target_vendor = "apple"), not(target_os = "windows"), not(target_os = "android"), not(target_os = "freebsd") ))] -use nix::sys::signal::{Signal, kill}; -#[cfg(all( - not(target_vendor = "apple"), - not(target_os = "windows"), - not(target_os = "android"), - not(target_os = "freebsd") -))] -use nix::unistd::Pid; -use pretty_assertions::assert_eq; -use rand::distr::Alphanumeric; -use rstest::rstest; +use rustix::process::{Pid, Signal, kill_process}; use std::char::from_digit; use std::fs::File; use std::io::Write; @@ -790,7 +783,11 @@ fn test_follow_with_pid() { .stdout_only_fixture("foobar_follow_multiple_appended.expected"); // kill the dummy process and give tail time to notice this - kill(Pid::from_raw(i32::try_from(pid).unwrap()), Signal::SIGUSR1).unwrap(); + kill_process( + Pid::from_raw(i32::try_from(pid).unwrap()).unwrap(), + Signal::USR1, + ) + .unwrap(); let _ = dummy.wait(); child.delay(DEFAULT_SLEEP_INTERVAL_MILLIS); @@ -2770,7 +2767,11 @@ fn test_fifo_with_pid() { child.make_assertion_with_delay(500).is_alive(); - kill(Pid::from_raw(i32::try_from(pid).unwrap()), Signal::SIGUSR1).unwrap(); + kill_process( + Pid::from_raw(i32::try_from(pid).unwrap()).unwrap(), + Signal::USR1, + ) + .unwrap(); let _ = dummy.wait(); child