MCPcopy Create free account
hub / github.com/PLSysSec/wave / check_os_getrandom

Function check_os_getrandom

tools/fuzz-gen/out.rs:143–160  ·  view source on GitHub ↗
(mut vec_buf: Vec<u8>, cnt: usize, flags: u32)

Source from the content-addressed store, hash-verified

141}
142#[quickcheck_macros::quickcheck]
143fn check_os_getrandom(mut vec_buf: Vec<u8>, cnt: usize, flags: u32) -> TestResult {
144 init();
145 let buf = &mut vec_buf[..];
146 if !(buf.len() >= cnt) {
147 return TestResult::discard();
148 }
149 let result = os_getrandom(buf, cnt, flags);
150 if !(!(result >= 0) || (buf.len() >= result as usize)) {
151 return TestResult::failed();
152 }
153 if !(!(result >= 0) || (result as usize <= cnt)) {
154 return TestResult::failed();
155 }
156 if !(true) {
157 return TestResult::failed();
158 }
159 TestResult::passed()
160}
161#[quickcheck_macros::quickcheck]
162fn check_os_nanosleep(vec_req: libc::timespec, mut vec_rem: libc::timespec) -> TestResult {
163 init();

Callers

nothing calls this directly

Calls 3

initFunction · 0.85
os_getrandomFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected