tests: extend test coverage of RND* ioctl commands
* tests/ioctl_random.c (main): Check the error path of RNDADDENTROPY parser. Check decoding of unrecognized RND* ioctl commands.
This commit is contained in:
parent
2649c8c8b6
commit
f9e5f12b7c
@ -59,6 +59,9 @@ main(void)
|
||||
printf("ioctl(-1, RNDGETENTCNT, %p)" RVAL_EBADF, &cnt);
|
||||
ioctl(-1, RNDADDTOENTCNT, &cnt);
|
||||
printf("ioctl(-1, RNDADDTOENTCNT, [6])" RVAL_EBADF);
|
||||
|
||||
ioctl(-1, RNDADDENTROPY, NULL);
|
||||
printf("ioctl(-1, RNDADDENTROPY, NULL)" RVAL_EBADF);
|
||||
ioctl(-1, RNDADDENTROPY, info);
|
||||
printf("ioctl(-1, RNDADDENTROPY, {entropy_count=3, buf_size=8, buf=\"12345678\"})" RVAL_EBADF);
|
||||
|
||||
@ -69,6 +72,9 @@ main(void)
|
||||
ioctl(-1, RNDRESEEDCRNG);
|
||||
printf("ioctl(-1, RNDRESEEDCRNG)" RVAL_EBADF);
|
||||
|
||||
ioctl(-1, _IO('R', 0xff), NULL);
|
||||
printf("ioctl(-1, _IOC(_IOC_NONE, %#x, 0xff, 0), 0)" RVAL_EBADF, 'R');
|
||||
|
||||
puts("+++ exited with 0 +++");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user