[LTP] [PATCH] Remove duplicated ".needs_tmpdir=1" when using equivalent flags
Petr Vorel
pvorel@suse.cz
Mon Dec 9 08:42:06 CET 2019
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
More information about the ltp
mailing list