mirror of
https://github.com/reactos/syzkaller.git
synced 2024-10-07 09:03:28 +00:00
sys/fuchsia: Add cprng and vmo tests.
This commit adds two new tests for fuchsia. One tests a basic syscall (zx_cprng_draw), and the other does multiple tests over a vmo.
This commit is contained in:
parent
2c31c529a9
commit
aa6c6a5572
@ -291,6 +291,9 @@ func parseProg(target *prog.Target, dir, filename string) (*prog.Prog, map[strin
|
||||
"EINVAL": 22,
|
||||
"ENOTTY": 25,
|
||||
"EOPNOTSUPP": 95,
|
||||
|
||||
// Fuchsia specific errors.
|
||||
"ZX_ERR_BAD_HANDLE": 11,
|
||||
}
|
||||
info := &ipc.ProgInfo{Calls: make([]ipc.CallInfo, len(p.Calls))}
|
||||
for i, call := range p.Calls {
|
||||
|
2
sys/fuchsia/test/cprng
Normal file
2
sys/fuchsia/test/cprng
Normal file
@ -0,0 +1,2 @@
|
||||
zx_cprng_draw(&(0x7f0000000000/0x100), 0x100)
|
||||
zx_cprng_draw(&(0x7f0000000000/0x1), 0x1)
|
5
sys/fuchsia/test/vmo
Normal file
5
sys/fuchsia/test/vmo
Normal file
@ -0,0 +1,5 @@
|
||||
zx_vmo_create(0x100, 0x0, &AUTO=<r0=>0x0)
|
||||
zx_vmo_write(r0, &AUTO="010101", 0x01, 0x4)
|
||||
zx_handle_close(r0)
|
||||
zx_vmo_write(r0, &AUTO="010101", 0x01, 0x4) # ZX_ERR_BAD_HANDLE
|
||||
zx_handle_close(r0) # ZX_ERR_BAD_HANDLE
|
Loading…
Reference in New Issue
Block a user