public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Alexey Kodanev <alexey.kodanev@oracle.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib/tst_rmdir.c: close TESTDIR files before rmobj()
Date: Tue, 22 Mar 2016 12:40:18 +0300	[thread overview]
Message-ID: <56F11302.80502@oracle.com> (raw)
In-Reply-To: <20160321122733.GC32294@rei.lan>

On 03/21/2016 03:27 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:
>>> This is the reason why we state in test writing guidelines that all open
>>> file descriptors should be closed in the cleanup() function.
>> Most tests are not doing it and just call tst_rmdir() in cleanup.
>> When a testfails in the middle, e.g. with tst_brkm(TFAIL,...),
>> it will getworthlessTWARN along with TFAIL.
>>
>> Some tests closes fds in cleanup, and it means that they set global vars
>> to keep track of open files. I think, itcomplicates a little bit writing
>> and reading such tests.So that is why I think it's better to have such
>> cleanup operations insidethe library.
> I'm not saying this is a bad idea. I'm not 100% sure if there are any
> side effects. Maybe we can add a close_fds flag to the test structure in
> the new test library and enable it only when it's needed.

OK, may be it's a good idea. So, should I wait till the merge or
send youa new patch for your repo first?

Thanks,
Alexey



  reply	other threads:[~2016-03-22  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-17 15:35 [LTP] [PATCH] lib/tst_rmdir.c: close TESTDIR files before rmobj() Alexey Kodanev
2016-03-17 16:15 ` Cyril Hrubis
2016-03-18 12:02   ` Alexey Kodanev
2016-03-21 12:27     ` Cyril Hrubis
2016-03-22  9:40       ` Alexey Kodanev [this message]
2016-03-31 10:19         ` Cyril Hrubis

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=56F11302.80502@oracle.com \
    --to=alexey.kodanev@oracle.com \
    --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