[libcxx-commits] [PATCH] D113298: [SystemZ][z/OS] Fix filesystem testing
Muiez Ahmed via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 5 10:40:27 PDT 2021
muiez created this revision.
muiez added reviewers: libc++, ldionne, Quuxplusone.
muiez requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.
This patch resolves many of the failures in the `filesystems/` buckets in the libc++ tests. It adds the correct flag to `fopen` and marks a test case as unsupported. In particular, that test assumes time is stored as a 64 bit value when on MVS it is stored as 32 bit.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D113298
Files:
libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
libcxx/test/support/filesystem_test_helper.h
Index: libcxx/test/support/filesystem_test_helper.h
===================================================================
--- libcxx/test/support/filesystem_test_helper.h
+++ libcxx/test/support/filesystem_test_helper.h
@@ -193,10 +193,10 @@
abort();
}
-#ifndef _WIN32
-#define FOPEN_CLOEXEC_FLAG "e"
-#else
+#if defined(_WIN32) || defined(__MVS__)
#define FOPEN_CLOEXEC_FLAG ""
+#else
+#define FOPEN_CLOEXEC_FLAG "e"
#endif
FILE* file = large_file_fopen(filename.c_str(), "w" FOPEN_CLOEXEC_FLAG);
if (file == nullptr) {
Index: libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
===================================================================
--- libcxx/test/libcxx/input.output/filesystems/class.directory_entry/directory_entry.mods/last_write_time.pass.cpp
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113298.385123.patch
Type: text/x-patch
Size: 1332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211105/81ee1143/attachment.bin>
More information about the libcxx-commits
mailing list