mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
src/dirstress: Allow ESTALE as well as ENOENT
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. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
0240a9c12f
commit
64ea47a87e
+6
-4
@@ -203,8 +203,9 @@ 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 +225,9 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user