Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] nfs01_open_files: Fix pattern for deleted files
@ 2022-03-11 11:00 Petr Vorel
  2022-03-11 11:08 ` Petr Vorel
  2022-03-11 12:43 ` Cyril Hrubis
  0 siblings, 2 replies; 4+ messages in thread
From: Petr Vorel @ 2022-03-11 11:00 UTC (permalink / raw)
  To: ltp; +Cc: Neil Brown

Fixes: 0989fe65f3 ("Corrected the export lines in nfs01 ...")

Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/network/nfs/nfs_stress/nfs01_open_files.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/network/nfs/nfs_stress/nfs01_open_files.c b/testcases/network/nfs/nfs_stress/nfs01_open_files.c
index 9342f11ba9..c5627058dc 100644
--- a/testcases/network/nfs/nfs_stress/nfs01_open_files.c
+++ b/testcases/network/nfs/nfs_stress/nfs01_open_files.c
@@ -10,7 +10,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
-#define TEMPLATE "ltpXXXXXX"
+#define TEMPLATE_PREFIX "ltp"
+#define TEMPLATE TEMPLATE_PREFIX "XXXXXX"
 
 int write_something(int);
 void delete_files(void);
@@ -101,7 +102,7 @@ void delete_files(void)
 
 	dirp = opendir(".");
 	for (entp = readdir(dirp); entp; entp = readdir(dirp))
-		if (!strncmp(entp->d_name, "apt", 3)) {
+		if (!strncmp(entp->d_name, TEMPLATE_PREFIX, 3)) {
 			if (stat(entp->d_name, &stat_buffer))
 				abortx("stat() failed for \"%s\", errno = %d",
 				       entp->d_name, errno);
-- 
2.35.1


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-03-11 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-11 11:00 [LTP] [PATCH 1/1] nfs01_open_files: Fix pattern for deleted files Petr Vorel
2022-03-11 11:08 ` Petr Vorel
2022-03-11 12:43 ` Cyril Hrubis
2022-03-11 14:50   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox