]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid false failure with replaced readdir
authorPádraig Brady <P@draigBrady.com>
Thu, 16 Jan 2025 14:56:22 +0000 (14:56 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 16 Jan 2025 14:58:02 +0000 (14:58 +0000)
* tests/rm/rm-readdir-fail.sh: Simulate EIO rather than ENOENT,
as gnulib absorbs the latter since commit 5a2d28df.

tests/rm/rm-readdir-fail.sh

index 8921190d61ff081877f6b8b5c92b1e0f44cf4d36..1c2401b65f2b61d17b80b7facb4831c5225b1c22 100755 (executable)
@@ -60,7 +60,7 @@ struct dirent *readdir (DIR *dirp)
   if (! (d = real_readdir (dirp)))
     {
       fprintf (stderr, "Failed to get dirent\n");
-      errno = ENOENT;
+      errno = EIO;
       return NULL;
     }
 
@@ -83,7 +83,7 @@ struct dirent *readdir (DIR *dirp)
     };
 
   /* Fail.  */
-  errno = ENOENT;
+  errno = EIO;
   return NULL;
 }
 EOF