Index: lib/fuzzer/FuzzerIOPosix.cpp =================================================================== --- lib/fuzzer/FuzzerIOPosix.cpp +++ lib/fuzzer/FuzzerIOPosix.cpp @@ -54,7 +54,7 @@ DIR *D = opendir(Dir.c_str()); if (!D) { - Printf("No such directory: %s; exiting\n", Dir.c_str()); + Printf("%s: %s; exiting\n", strerror(errno), Dir.c_str()); exit(1); } while (auto E = readdir(D)) { Index: test/fuzzer/fuzzer-dirs.test =================================================================== --- test/fuzzer/fuzzer-dirs.test +++ test/fuzzer/fuzzer-dirs.test @@ -17,5 +17,5 @@ RUN: rm -rf %t/SUB1 RUN: not %t-SimpleTest NONEXISTENT_DIR 2>&1 | FileCheck %s --check-prefix=NONEXISTENT_DIR -NONEXISTENT_DIR: No such directory: NONEXISTENT_DIR; exiting +NONEXISTENT_DIR: No such file or directory: NONEXISTENT_DIR; exiting