]>
git.proxmox.com Git - rustc.git/blob - vendor/rustix/tests/process/id.rs
5 assert_eq
!(process
::getuid(), process
::getuid());
7 assert_eq
!(process
::getuid().as_raw(), libc
::getuid());
8 assert_eq
!(process
::getuid().is_root(), libc
::getuid() == 0);
14 assert_eq
!(process
::getgid(), process
::getgid());
16 assert_eq
!(process
::getgid().as_raw(), libc
::getgid());
17 assert_eq
!(process
::getgid().is_root(), libc
::getgid() == 0);
23 assert_eq
!(process
::geteuid(), process
::geteuid());
25 assert_eq
!(process
::geteuid().as_raw(), libc
::geteuid());
26 assert_eq
!(process
::geteuid().is_root(), libc
::geteuid() == 0);
32 assert_eq
!(process
::getegid(), process
::getegid());
34 assert_eq
!(process
::getegid().as_raw(), libc
::getegid());
35 assert_eq
!(process
::getegid().is_root(), libc
::getegid() == 0);
41 assert_eq
!(process
::getpid(), process
::getpid());
44 process
::getpid().as_raw_nonzero().get() as libc
::pid_t
,
47 assert_eq
!(process
::getpid().is_init(), libc
::getpid() == 1);
53 assert_eq
!(process
::getppid(), process
::getppid());
56 process
::Pid
::as_raw(process
::getppid()) as libc
::pid_t
,
59 if let Some(ppid
) = process
::getppid() {
60 assert_eq
!(ppid
.is_init(), libc
::getppid() == 1);
62 assert_eq
!(libc
::getppid(), 0);