Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uucore: Fix proc_info compilation #7385

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/uucore/src/lib/features/proc_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ mod tests {

#[test]
fn test_thread_ids() {
let main_tid = unsafe { uucore::libc::gettid() };
let main_tid = unsafe { crate::libc::gettid() };
std::thread::spawn(move || {
let mut pid_entry = ProcessInformation::try_new(
PathBuf::from_str(&format!("/proc/{}", current_pid())).unwrap(),
Expand All @@ -482,7 +482,7 @@ mod tests {

assert!(thread_ids.contains(&(main_tid as usize)));

let new_thread_tid = unsafe { uucore::libc::gettid() };
let new_thread_tid = unsafe { crate::libc::gettid() };
assert!(thread_ids.contains(&(new_thread_tid as usize)));
})
.join()
Expand All @@ -507,9 +507,9 @@ mod tests {
PathBuf::from_str(&format!("/proc/{}", current_pid())).unwrap(),
)
.unwrap();
assert_eq!(pid_entry.uid().unwrap(), uucore::process::getuid());
assert_eq!(pid_entry.euid().unwrap(), uucore::process::geteuid());
assert_eq!(pid_entry.gid().unwrap(), uucore::process::getgid());
assert_eq!(pid_entry.egid().unwrap(), uucore::process::getegid());
assert_eq!(pid_entry.uid().unwrap(), crate::process::getuid());
assert_eq!(pid_entry.euid().unwrap(), crate::process::geteuid());
assert_eq!(pid_entry.gid().unwrap(), crate::process::getgid());
assert_eq!(pid_entry.egid().unwrap(), crate::process::getegid());
}
}
Loading