File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 6868// //////////////////////////////////////////////////////////////////////////////
6969// Errno checks.
7070
71+ #ifdef LIBC_TARGET_ARCH_IS_GPU
72+ #define ASSERT_ERRNO_EQ (VAL )
73+ #define ASSERT_ERRNO_SUCCESS ()
74+ #define ASSERT_ERRNO_FAILURE ()
75+ #else
7176#define ASSERT_ERRNO_EQ (VAL ) ASSERT_EQ(VAL, static_cast <int >(errno))
7277#define ASSERT_ERRNO_SUCCESS () ASSERT_EQ(0 , static_cast <int >(errno))
7378#define ASSERT_ERRNO_FAILURE () ASSERT_NE(0 , static_cast <int >(errno))
79+ #endif
7480
7581// Integration tests are compiled with -ffreestanding which stops treating
7682// the main function as a non-overloadable special function. Hence, we use a
Original file line number Diff line number Diff line change 1616// Define macro to validate the value stored in the errno and restore it
1717// to zero.
1818
19+ #ifdef LIBC_TARGET_ARCH_IS_GPU
20+ #define ASSERT_ERRNO_EQ (VAL )
21+ #define ASSERT_ERRNO_SUCCESS ()
22+ #define ASSERT_ERRNO_FAILURE ()
23+ #else
1924#define ASSERT_ERRNO_EQ (VAL ) \
2025 do { \
2126 ASSERT_EQ (VAL, static_cast <int >(libc_errno)); \
2732 ASSERT_NE (0 , static_cast <int >(libc_errno)); \
2833 libc_errno = 0 ; \
2934 } while (0 )
35+ #endif
3036
3137namespace LIBC_NAMESPACE_DECL {
3238namespace testing {
You can’t perform that action at this time.
0 commit comments