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

Function test_abstract_unix_msg

tests/net/unix.rs:421–433  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

419#[cfg(linux_kernel)]
420#[test]
421fn test_abstract_unix_msg() {
422 crate::init();
423
424 use std::os::unix::ffi::OsStrExt as _;
425
426 let tmpdir = tempfile::tempdir().unwrap();
427 let path = tmpdir.path().join("scp_4804");
428
429 let name = SocketAddrUnix::new_abstract_name(path.as_os_str().as_bytes()).unwrap();
430 assert_eq!(name.abstract_name(), Some(path.as_os_str().as_bytes()));
431 assert!(!name.is_unnamed());
432 do_test_unix_msg(name);
433}
434
435/// Like `test_abstract_unix_msg` but tests `do_test_unix_msg_unconnected`.
436#[cfg(linux_kernel)]

Callers

nothing calls this directly

Calls 4

initFunction · 0.70
do_test_unix_msgFunction · 0.70
pathMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected