[LTP] [PATCH] syscalls/mmap16: close open files in cleanup path

Jan Stancek jstancek@redhat.com
Mon Jul 11 14:19:30 CEST 2016


----- Original Message -----
> From: "Peter Maydell" <peter.maydell@linaro.org>
> To: ltp@lists.linux.it
> Cc: patches@linaro.org
> Sent: Friday, 1 July, 2016 4:55:25 PM
> Subject: [LTP] [PATCH] syscalls/mmap16: close open files in cleanup path
> 
> If the mmap16 test fails while the do_test() function
> still has its filedescriptor open, the cleanup function's
> attempt to unmount will fail with EBUSY, resulting in a
> lot of noise in the test log, a leaked mounted filesystem
> and unnecessary test failures later in the run.
> 
> Make the do_test() file descriptor global so we can
> close it in the cleanup function if necessary.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Hi,

pushed with small change, which treats uninitialized fd as -1, not 0.

Regards,
Jan


More information about the ltp mailing list