[libc-commits] [PATCH] D95648: [libc][NFC] add death test macro for Fuchsia
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Jan 28 16:14:07 PST 2021
michaelrj created this revision.
michaelrj added a reviewer: sivachandra.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added a project: libc-project.
michaelrj requested review of this revision.
Fuchsia's zxtest has a slightly different death test definition, and
this macro makes our death test work on Fuchsia.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95648
Files:
libc/test/src/fenv/enabled_exceptions_test.cpp
libc/utils/UnitTest/FuchsiaTest.h
libc/utils/UnitTest/LibcTest.h
Index: libc/utils/UnitTest/LibcTest.h
===================================================================
--- libc/utils/UnitTest/LibcTest.h
+++ libc/utils/UnitTest/LibcTest.h
@@ -273,4 +273,6 @@
return; \
} while (0)
+#define WITH_SIGNAL(X) X
+
#endif // LLVM_LIBC_UTILS_UNITTEST_LIBCTEST_H
Index: libc/utils/UnitTest/FuchsiaTest.h
===================================================================
--- libc/utils/UnitTest/FuchsiaTest.h
+++ libc/utils/UnitTest/FuchsiaTest.h
@@ -11,4 +11,6 @@
#include <zxtest/zxtest.h>
+#define WITH_SIGNAL(X) #X
+
#endif // LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H
Index: libc/test/src/fenv/enabled_exceptions_test.cpp
===================================================================
--- libc/test/src/fenv/enabled_exceptions_test.cpp
+++ libc/test/src/fenv/enabled_exceptions_test.cpp
@@ -45,6 +45,6 @@
// exception.
__llvm_libc::feraiseexcept(e);
},
- SIGFPE);
+ WITH_SIGNAL(SIGFPE));
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95648.319986.patch
Type: text/x-patch
Size: 1062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210129/69f14cf7/attachment.bin>
More information about the libc-commits
mailing list