[LTP] [PATCH v8] Refactor aiocp using new LTP API
Cyril Hrubis
chrubis@suse.cz
Mon Aug 22 12:25:20 CEST 2022
Hi!
> + while (i < size) {
> + if (!tst_remaining_runtime())
> + tst_brk(TCONF, "Out of runtime!");
>
> - if (!prefix_max) {
> - fprintf(stderr, "Path '%s' not found in /proc/mounts\n", path);
> - return 0;
> - }
> -
> - printf("Path '%s' is on device '%s'\n", path, dev_name);
> + offset = rand() % (bufsize / 2);
This is now length not offset, also now the size we pass to the write
varies between 0 and bufsize/2. Shouldn't we rather go for a size
between bufsize/2 and bufsize?
len = rand() % (bufsize/2) + bufsize/2;
towrite = MIN(len, size-i);
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list