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

Function test_abstract_unix_msg_unconnected

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

Source from the content-addressed store, hash-verified

433#[cfg(linux_kernel)]
434#[test]
435fn test_abstract_unix_msg_unconnected() {
436 crate::init();
437
438 use std::os::unix::ffi::OsStrExt as _;
439
440 let tmpdir = tempfile::tempdir().unwrap();
441 let path = tmpdir.path().join("scp_4804");
442
443 let name = SocketAddrUnix::new_abstract_name(path.as_os_str().as_bytes()).unwrap();
444 assert_eq!(name.abstract_name(), Some(path.as_os_str().as_bytes()));
445 assert!(!name.is_unnamed());
446 do_test_unix_msg_unconnected(name);
447}
448
449#[cfg(not(any(target_os = "redox", target_os = "wasi")))]
450#[cfg(feature = "pipe")]

Callers

nothing calls this directly

Calls 4

initFunction · 0.70
pathMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected