summaryrefslogtreecommitdiff
path: root/test/sys/test_mman.rs
diff options
context:
space:
mode:
authorRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-02 14:12:34 -0600
committerRyan Zoeller <rtzoeller@rtzoeller.com>2022-01-02 16:53:42 -0600
commitb7dd35e9b3f128bc8ffebe00d362f7cfa3144309 (patch)
tree197b609ecc57d6a527559b1711f3b6861360a8e9 /test/sys/test_mman.rs
parentc1abab9714f46234a692d8f3447899a5f8f6a25f (diff)
downloadnix-b7dd35e9b3f128bc8ffebe00d362f7cfa3144309.zip
Correct MAP_FIXED documentation for NetBSD
The previous documentation described the default behavior, rather than the behavior when the flag was set. Also fix a test which is failing due to passing this flag erroneously.
Diffstat (limited to 'test/sys/test_mman.rs')
-rw-r--r--test/sys/test_mman.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/test/sys/test_mman.rs b/test/sys/test_mman.rs
index a7ceedcb..8858375a 100644
--- a/test/sys/test_mman.rs
+++ b/test/sys/test_mman.rs
@@ -73,16 +73,11 @@ fn test_mremap_shrink() {
assert_eq !(slice[ONE_K - 1], 0xFF);
let slice : &mut[u8] = unsafe {
- #[cfg(target_os = "linux")]
let mem = mremap(slice.as_mut_ptr() as * mut c_void, 10 * ONE_K, ONE_K,
MRemapFlags::empty(), None)
.unwrap();
// Since we didn't supply MREMAP_MAYMOVE, the address should be the
// same.
- #[cfg(target_os = "netbsd")]
- let mem = mremap(slice.as_mut_ptr() as * mut c_void, 10 * ONE_K, ONE_K,
- MRemapFlags::MAP_FIXED, None)
- .unwrap();
assert_eq !(mem, slice.as_mut_ptr() as * mut c_void);
std::slice::from_raw_parts_mut(mem as * mut u8, ONE_K)
};