[LTP] [PATCH v8] Refactor aiocp using new LTP API

Richard Palethorpe rpalethorpe@suse.de
Tue Oct 11 14:29:06 CEST 2022


Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> 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);
>

Also setting this one to "changes requested".


-- 
Thank you,
Richard.


More information about the ltp mailing list