[LTP] [PATCH] syscalls: close open files in cleanup

Alexey Kodanev alexey.kodanev@oracle.com
Tue Mar 22 10:11:18 CET 2016


Hi,
On 03/21/2016 04:04 PM, Cyril Hrubis wrote:
> Hi!
>> NFS creates special .nfs* files when test file was removed and
>> left open. In that case, tst_rmdir() fails to remove test dirs.
>>
>> Close left open files in cleanup and replace some of safe_open()
>> calls with safe_file_printf() ones for test files which fd won't
>> be used in a test.
> I would be closing the file descriptors only if they were initialized
> with value > 0, since otherwise there would be misleading failing close
> in the strace in case that some setup step prior to the SAFE_OPEN()
> failed.

Added checks and applied.

Thanks,
Alexey

> Otherwise it looks good.
>



More information about the ltp mailing list