From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] Remove duplicated ".needs_tmpdir=1" when using equivalent flags
Date: Mon, 9 Dec 2019 08:42:06 +0100 [thread overview]
Message-ID: <20191209074206.GA2373112@x230> (raw)
In-Reply-To: <1575447166-7813-1-git-send-email-xuyang2018.jy@cn.fujitsu.com>
Hi Xu,
> From ltp library code, when we have used these flags(".needs_device"
> ".mntpoint" ".resource_file" ".needs_checkpoints" ".format_device"
> "mount_device" ".all_filesystems"), we don't need to set ".needs_tmpdir=1".
> So remove it.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
LGTM (unless Cyril has some objections).
I propose following diff (fix formating, reword; I'll modify it before merge).
Kind regards,
Petr
diff --git doc/test-writing-guidelines.txt doc/test-writing-guidelines.txt
index 29b0e5db2..e8e766753 100644
--- doc/test-writing-guidelines.txt
+++ doc/test-writing-guidelines.txt
@@ -493,10 +493,10 @@ this needed.
If '.needs_tmpdir' is set to '1' in the 'struct tst_test' unique test
temporary is created and it's set as the test working directory. Tests *MUST
-NOT* create temporary files outside that directory. If we have used one of
-these flags(".needs_device" ".mntpoint" ".resource_file" ".needs_checkpoints"
-".format_device" "mount_device" ".all_filesystems"), we don't need to set
-'.needs_tmpdir' again because these flags also will create temporary directory.
+NOT* create temporary files outside that directory. The flag is not needed to
+be set when use these flags: '.all_filesystems', '.format_device', '.mntpoint',
+'.mount_device' '.needs_checkpoints', '.needs_device', '.resource_file'
+(these flags imply creating temporary directory).
IMPORTANT: Close all file descriptors (that point to files in test temporary
directory, even the unlinked ones) either in the 'test()' function
next prev parent reply other threads:[~2019-12-09 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 8:12 [LTP] [PATCH] Remove duplicated ".needs_tmpdir=1" when using equivalent flags Yang Xu
2019-12-09 7:42 ` Petr Vorel [this message]
2019-12-09 20:34 ` Petr Vorel
2019-12-10 10:51 ` Cyril Hrubis
2019-12-10 13:01 ` Petr Vorel
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=20191209074206.GA2373112@x230 \
--to=pvorel@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