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

Function test_abstract_unix_msg

tests/net/unix_alloc.rs:418–430  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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