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

Function test_get_clear_child_tid_address

tests/thread/prctl.rs:106–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104#[cfg(feature = "system")]
105#[test]
106fn test_get_clear_child_tid_address() {
107 if !linux_kernel_config_item_is_enabled("CONFIG_CHECKPOINT_RESTORE").unwrap_or(false) {
108 eprintln!(
109 "test_get_clear_child_tid_address: Test skipped due to missing kernel feature: \
110 CONFIG_CHECKPOINT_RESTORE."
111 );
112 return;
113 }
114
115 match get_clear_child_tid_address() {
116 Ok(address) => println!("get_clear_child_tid_address = {:?}", address),
117
118 Err(r) => {
119 let errno = r.raw_os_error();
120 assert!(errno == libc::ENODEV || errno == libc::EINVAL);
121 eprintln!("test_get_clear_child_tid_address: Test unsupported: {}", r);
122 }
123 }
124}
125
126#[cfg(feature = "system")]
127#[test]

Callers

nothing calls this directly

Calls 3

raw_os_errorMethod · 0.45

Tested by

no test coverage detected