-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[scudo][gwp_asan] Clean up Fuchsia zxtest framework integration #90015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This brings the scudo and gwp_asan code in line with how the llvm-libc code selects using zxtest vs gtest on Fuchsia.
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Roland McGrath (frobtech) ChangesWhen the characteristics of a procedure depend on a procedure that Fixes #88677. Full diff: https://github.com/llvm/llvm-project/pull/90015.diff 2 Files Affected:
diff --git a/compiler-rt/lib/gwp_asan/tests/harness.h b/compiler-rt/lib/gwp_asan/tests/harness.h
index ae39a443bd0a09..205a0250329e4f 100644
--- a/compiler-rt/lib/gwp_asan/tests/harness.h
+++ b/compiler-rt/lib/gwp_asan/tests/harness.h
@@ -11,7 +11,7 @@
#include <stdarg.h>
-#if defined(__Fuchsia__)
+#ifdef LIBC_COPT_TEST_USE_ZXTEST
#define ZXTEST_USE_STREAMABLE_MACROS
#include <zxtest/zxtest.h>
namespace testing = zxtest;
diff --git a/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h b/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h
index 4283416435ba0c..1a911d2d8dff44 100644
--- a/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h
+++ b/compiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h
@@ -8,7 +8,7 @@
#include "platform.h"
-#if SCUDO_FUCHSIA
+#ifdef LIBC_COPT_TEST_USE_ZXTEST
#include <zxtest/zxtest.h>
using Test = ::zxtest::Test;
#else
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with comments
@@ -8,7 +8,7 @@ | |||
|
|||
#include "platform.h" | |||
|
|||
#if SCUDO_FUCHSIA | |||
#ifdef LIBC_COPT_TEST_USE_ZXTEST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At line 48 too?
@@ -11,7 +11,7 @@ | |||
|
|||
#include <stdarg.h> | |||
|
|||
#if defined(__Fuchsia__) | |||
#ifdef LIBC_COPT_TEST_USE_ZXTEST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is removing the only occurrence of "Fuchsia" in this file, I'm wondering if we could leave some breadcrumb comment that ties zxtest back to Fuchsia like you did in libc/test/UnitTest/Test.h
, for the benefit of those who don't know what zxtest is
This brings the scudo and gwp_asan code in line with how the
llvm-libc code selects using zxtest vs gtest on Fuchsia.