machinarium: add consistency read check for large buffers

This commit is contained in:
Dmitry Simonenko 2017-11-28 18:22:43 +03:00
parent a33289b749
commit bb28016237
1 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,12 @@ client(void *arg)
rc = machine_read(client, buf, 10 * 1024 * 1024, UINT32_MAX);
test(rc == 0);
char *buf_cmp = malloc(10 * 1024 * 1024);
test(buf_cmp != NULL);
memset(buf_cmp, 'x', 10 * 1024 * 1024);
test(memcmp(buf_cmp, buf, 10 * 1024 * 1024) == 0 );
free(buf_cmp);
free(buf);
rc = machine_close(client);