MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / test_uname

Function test_uname

tests/system/uname.rs:2–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1#[test]
2fn test_uname() {
3 let name: rustix::system::Uname = rustix::system::uname();
4
5 assert!(!name.sysname().to_bytes().is_empty());
6 assert!(!name.nodename().to_bytes().is_empty());
7 assert!(!name.release().to_bytes().is_empty());
8 assert!(!name.version().to_bytes().is_empty());
9 assert!(!name.machine().to_bytes().is_empty());
10
11 #[cfg(linux_kernel)]
12 assert!(!name.domainname().to_bytes().is_empty());
13
14 #[cfg(linux_kernel)]
15 assert_eq!(name.sysname(), rustix::cstr!("Linux"));
16}

Callers

nothing calls this directly

Calls 1

unameFunction · 0.50

Tested by

no test coverage detected