[LTP] [PATCH v2 10/13] getdtablesize01: Handle ENFILE errno

Punit Agrawal punit.agrawal@arm.com
Thu Nov 30 17:06:33 CET 2017


Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>>  //Now the max files opened should be RLIMIT_NOFILE - 1 , why ? read getdtablesize man page
>>  
>> -	if (count > 0)
>> -		close(count);
>>  	if (count == (max_val_opfiles - 1))
>>  		tst_resm(TPASS, "%d = %d", count, (max_val_opfiles - 1));
>
> We may also check for EMFILE here.

I don't understand what you're suggesting here.

>
>> +	else if (fd < 0 && errno == ENFILE)
>> +		tst_brkm(TBROK, cleanup, "Reached maximum number of open files for the system");
>                            ^
> 			   This should rather be TCONF i.e. skipped.

I've changed TBROK to TCONF now.

Thanks.

[...]



More information about the ltp mailing list