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

Function check_os_read

tools/fuzz-gen/out.rs:397–414  ·  view source on GitHub ↗
(fd: usize, mut vec_buf: Vec<u8>, cnt: usize)

Source from the content-addressed store, hash-verified

395}
396#[quickcheck_macros::quickcheck]
397fn check_os_read(fd: usize, mut vec_buf: Vec<u8>, cnt: usize) -> TestResult {
398 init();
399 let buf = &mut vec_buf[..];
400 if !(buf.len() >= cnt) {
401 return TestResult::discard();
402 }
403 let result = os_read(fd, buf, cnt);
404 if !(!(result >= 0) || (buf.len() >= result as usize)) {
405 return TestResult::failed();
406 }
407 if !(!(result >= 0) || (result as usize <= cnt)) {
408 return TestResult::failed();
409 }
410 if !(true) {
411 return TestResult::failed();
412 }
413 TestResult::passed()
414}
415#[quickcheck_macros::quickcheck]
416fn check_os_write(fd: usize, vec_buf: Vec<u8>, cnt: usize) -> TestResult {
417 init();

Callers

nothing calls this directly

Calls 2

initFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected