Skip to content

Commit a74a04f

Browse files
committed
Test 'libc::getrandom' as well
1 parent 8650f02 commit a74a04f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/run-pass/linux-getrandom.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ fn main() {
88
unsafe {
99
assert_eq!(libc::syscall(libc::SYS_getrandom, 0 as *mut libc::c_void, 0 as libc::size_t, 0 as libc::c_uint), 0);
1010
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);
11+
12+
assert_eq!(libc::getrandom(0 as *mut libc::c_void, 0 as libc::size_t, 0 as libc::c_uint), 0);
13+
assert_eq!(libc::getrandom(buf.as_mut_ptr() as *mut libc::c_void, 5 as libc::size_t, 0 as libc::c_uint), 5);
1114
}
1215
}

0 commit comments

Comments
 (0)