From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls: close open files in cleanup
Date: Mon, 21 Mar 2016 14:04:39 +0100 [thread overview]
Message-ID: <20160321130439.GA1022@rei> (raw)
In-Reply-To: <1458309428-16300-1-git-send-email-alexey.kodanev@oracle.com>
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.
Otherwise it looks good.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-03-21 13:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 13:57 [LTP] [PATCH] syscalls: close open files in cleanup Alexey Kodanev
2016-03-21 13:04 ` Cyril Hrubis [this message]
2016-03-22 9:11 ` Alexey Kodanev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160321130439.GA1022@rei \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox