Test 'libc::getrandom' as well
This commit is contained in:
parent
8650f02bc9
commit
a74a04f356
@ -8,5 +8,8 @@ fn main() {
|
||||
unsafe {
|
||||
assert_eq!(libc::syscall(libc::SYS_getrandom, 0 as *mut libc::c_void, 0 as libc::size_t, 0 as libc::c_uint), 0);
|
||||
assert_eq!(libc::syscall(libc::SYS_getrandom, buf.as_mut_ptr() as *mut libc::c_void, 5 as libc::size_t, 0 as libc::c_uint), 5);
|
||||
|
||||
assert_eq!(libc::getrandom(0 as *mut libc::c_void, 0 as libc::size_t, 0 as libc::c_uint), 0);
|
||||
assert_eq!(libc::getrandom(buf.as_mut_ptr() as *mut libc::c_void, 5 as libc::size_t, 0 as libc::c_uint), 5);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user