Skip to contentSkip to conversation

dirstress: Allow ESTALE as well as ENOENT

PATCH In review J. Bruce Fields 3 participants 8 messages Nov 23, 2016 – Nov 29, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dirstress: Allow ESTALE as well as ENOENT

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

This was causing intermittent failures on generic/011 on NFS.

---
 src/dirstress.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Sorry, who do xfstests patches go to?--b.

src/dirstress.c +8 -4
index f8f7355..33a166c 100644
@@ -203,8 +203,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
 			return 0;
 		}
 
@@ -224,8 +226,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
 			return 0;
 		}
 
Signature · 1 line
2.9.3
#1 lore raw
Quoted 6 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

Quoted 8 lines

This was causing intermittent failures on generic/011 on NFS.

---
src/dirstress.c | 12 ++++++++----

1 file changed, 8 insertions(+), 4 deletions(-)

Sorry, who do xfstests patches go to?--b.

They are sent to [email protected]

Cheers, Andreas

Quoted 34 lines
src/dirstress.c +8 -5
index f8f7355..33a166c 100644
@@ -203,8 +203,10 @@ dirstress(
        if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
 			return 0;
 		}
 
@@ -224,8 +226,10 @@ dirstress(
        if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
 			return 0;
 		}
 
--

2.9.3

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Cheers, Andreas

#2 lore raw
Quoted 9 lines · Andreas Dilger
Quoted 8 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

This was causing intermittent failures on generic/011 on NFS.

Quoted 8 lines
Quoted 6 lines

---
src/dirstress.c | 12 ++++++++----

1 file changed, 8 insertions(+), 4 deletions(-)

Sorry, who do xfstests patches go to?--b.

They are sent to [email protected]

Thanks!

Might be worth something like this too?

--b.

commit 0d61e7b9779d

Author: J. Bruce Fields <[email protected]>
Date:   Thu Nov 24 22:41:26 2016 -0500

Document fstests mailing list

README +6 -0
index d1f6788a17a3..0a6ac6ece5aa 100644
@@ -248,3 +248,9 @@ Pass/failure:
     The recent pass/fail history is maintained in the file "check.log".
     The elapsed time for the most recent pass for each test is kept
     in "check.time".
+
+__________________
+SUBMITTING PATCHES
+__________________
+
+Send patches to the fstests mailing list at [email protected].
#3 lore raw

Hi Bruce,

Quoted 15 lines · J. Bruce Fields
Quoted 14 lines · Andreas Dilger
Quoted 13 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

This was causing intermittent failures on generic/011 on NFS.

---
src/dirstress.c | 12 ++++++++----

1 file changed, 8 insertions(+), 4 deletions(-)
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Sorry, who do xfstests patches go to?--b.

They are sent to [email protected]

Thanks!

Might be worth something like this too?

This looks fine to me. Can you please resend as a formal patch? Also the patch to fix dirstress.c.

Thanks,
Eryu

#4 lore raw

PATCH 1/2 Document fstests mailing list

From: "J. Bruce Fields" <[email protected]>

---
 README | 6 ++++++
 1 file changed, 6 insertions(+)
Quoted 2 lines

This looks fine to me. Can you please resend as a formal patch? Also the patch to fix dirstress.c.

Sure, here you go.--b.

README +6 -0
index 8a362bd51f49..9f20884ecd37 100644
@@ -243,3 +243,9 @@ Pass/failure:
     The recent pass/fail history is maintained in the file "check.log".
     The elapsed time for the most recent pass for each test is kept
     in "check.time".
+
+__________________
+SUBMITTING PATCHES
+__________________
+
+Send patches to the fstests mailing list at [email protected].
Signature · 1 line
2.9.3
#5 lore raw

PATCH 2/2 dirstress: Allow ESTALE as well as ENOENT

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

This was causing intermittent failures on generic/011 on NFS.

---
 src/dirstress.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
src/dirstress.c +8 -4
index f8f73553a1bc..33a166c51819 100644
@@ -203,8 +203,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
 			return 0;
 		}
 
@@ -224,8 +226,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
 			return 0;
 		}
 
Signature · 1 line
2.9.3
#6 lore raw
Quoted 17 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

This was causing intermittent failures on generic/011 on NFS.

---
 src/dirstress.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
src/dirstress.c +0 -0
index f8f73553a1bc..33a166c51819 100644

src/dirstress.c dirstress( · line 209

Quoted 9 lines
src/dirstress.c +4 -2
@@ -203,8 +203,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
                                                         ^^^ this should be ==

src/dirstress.c dirstress( · line 232

Quoted 13 lines
src/dirstress.c +4 -2
 			return 0;
 		}
 
@@ -224,8 +226,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {

^^^ same here

I can fix them at commit time, no resend is needed.

Thanks,
Eryu

Quoted 10 lines
src/dirstress.c +0 -0
 			return 0;
 		}
 
Signature · 6 lines
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw
Quoted 43 lines · Eryu Guan
Quoted 17 lines · J. Bruce Fields

From: "J. Bruce Fields" <[email protected]>

In the NFS case an attempt to chdir out of a removed directory could result in ESTALE, and that should not cause the test to fail.

This was causing intermittent failures on generic/011 on NFS.

---
 src/dirstress.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
src/dirstress.c +0 -0
index f8f73553a1bc..33a166c51819 100644

src/dirstress.c dirstress( · line 209

Quoted 9 lines
src/dirstress.c +4 -2
@@ -203,8 +203,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {
                                                         ^^^ this should be ==

src/dirstress.c dirstress( · line 232

Quoted 13 lines
src/dirstress.c +4 -2
 			return 0;
 		}
 
@@ -224,8 +226,10 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
 	error = chdir("..");
 	if (error) {
-		/* If this is multithreaded, then expecting a ENOENT here is fine */
-		if (nprocs_per_dir > 1 && errno == ENOENT) {
+		/* If this is multithreaded, then expecting a ENOENT here is fine,
+		 * and ESTALE is normal in the NFS case. */
+		if (nprocs_per_dir > 1 &&
+				(errno == ENOENT || errno = ESTALE)) {

^^^ same here

Quoted 1 line

I can fix them at commit time, no resend is needed.

Oh, good grief. Thanks for catching that!

I can confirm that my problem's still fixed with the corrected patch.

--b.

Quoted 14 lines

Thanks,
Eryu

Quoted 10 lines
src/dirstress.c +0 -0
 			return 0;
 		}
 
Signature · 6 lines
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html