diff --git a/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp --- a/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp +++ b/libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp @@ -15,6 +15,9 @@ // other platforms. // UNSUPPORTED: windows +// This test assumes that time is stored as a 64 bit value when on MVS it is stored as 32 bit +// UNSUPPORTED: target={{.+}}-zos{{.*}} + // TODO(ldionne): This test fails on Ubuntu Focal on our CI nodes (and only there), in 32 bit mode. // UNSUPPORTED: linux && 32bits-on-64bits diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h --- a/libcxx/test/support/filesystem_test_helper.h +++ b/libcxx/test/support/filesystem_test_helper.h @@ -193,10 +193,10 @@ abort(); } -#ifndef _WIN32 -#define FOPEN_CLOEXEC_FLAG "e" +#if defined(_WIN32) || defined(__MVS__) +# define FOPEN_CLOEXEC_FLAG "" #else -#define FOPEN_CLOEXEC_FLAG "" +# define FOPEN_CLOEXEC_FLAG "e" #endif FILE* file = large_file_fopen(filename.c_str(), "w" FOPEN_CLOEXEC_FLAG); if (file == nullptr) {