aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-10-21 08:02:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-10-21 08:02:50 +0000
commitebfb48b5f529d090d1e0ce2c33a4c5ca4fab2503 (patch)
treedeb966535cb5fec1afd59677b5182ca13a5b5671
parent89016a333f62518487cf49d62af2b780b9338983 (diff)
parentf03c4dc05897d323913ff9f3f17b683289e755cd (diff)
downloadbionic-gki13-boot-release.tar.gz
Merge "Snap for 9203002 from 579088b354f0877fb06b707e7c4b84f08629b404 to gki13-boot-release" into gki13-boot-releasegki13-boot-release
-rw-r--r--libc/Android.bp9
-rw-r--r--tests/setjmp_test.cpp2
-rw-r--r--tests/signal_test.cpp7
-rw-r--r--tests/string_test.cpp2
4 files changed, 19 insertions, 1 deletions
diff --git a/libc/Android.bp b/libc/Android.bp
index d0c4180ed..6799dd6bb 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -2334,6 +2334,14 @@ ndk_headers {
}
ndk_headers {
+ name: "libc_asm_riscv64",
+ from: "kernel/uapi/asm-riscv",
+ to: "riscv64-linux-android",
+ srcs: ["kernel/uapi/asm-riscv/**/*.h"],
+ license: "NOTICE",
+}
+
+ndk_headers {
name: "libc_asm_x86",
from: "kernel/uapi/asm-x86",
to: "i686-linux-android",
@@ -2362,6 +2370,7 @@ ndk_library {
"libc_kernel_android_scsi",
"libc_asm_arm",
"libc_asm_arm64",
+ "libc_asm_riscv64",
"libc_asm_x86",
"libc_asm_x86_64",
],
diff --git a/tests/setjmp_test.cpp b/tests/setjmp_test.cpp
index c9e9a0cfe..2f891ec0f 100644
--- a/tests/setjmp_test.cpp
+++ b/tests/setjmp_test.cpp
@@ -81,8 +81,10 @@ struct SigSets {
sigset64_t ss;
sigemptyset64(&ss);
sigaddset64(&ss, SIGUSR1 + offset);
+#if defined(__BIONIC__)
// TIMER_SIGNAL.
sigaddset64(&ss, __SIGRTMIN);
+#endif
sigaddset64(&ss, SIGRTMIN + offset);
return ss;
}
diff --git a/tests/signal_test.cpp b/tests/signal_test.cpp
index 5bda8b329..7f7f3dbfa 100644
--- a/tests/signal_test.cpp
+++ b/tests/signal_test.cpp
@@ -34,6 +34,13 @@
using namespace std::chrono_literals;
+#if defined(ANDROID_HOST_MUSL)
+// Musl doesn't export __SIGRTMIN and __SIGRTMAX, #define
+// them here.
+#define __SIGRTMIN 32
+#define __SIGRTMAX 64
+#endif
+
static int SIGNAL_MIN() {
return 1; // Signals start at 1 (SIGHUP), not 0.
}
diff --git a/tests/string_test.cpp b/tests/string_test.cpp
index 30c87dc9a..38957e24b 100644
--- a/tests/string_test.cpp
+++ b/tests/string_test.cpp
@@ -136,7 +136,7 @@ TEST(STRING_TEST, strsignal) {
// A real-time signal.
ASSERT_STREQ("Real-time signal 14", strsignal(SIGRTMIN + 14));
// One of the signals the C library keeps to itself.
- ASSERT_STREQ("Unknown signal 32", strsignal(__SIGRTMIN));
+ ASSERT_STREQ("Unknown signal 32", strsignal(32)); // __SIGRTMIN
// Errors.
ASSERT_STREQ("Unknown signal -1", strsignal(-1)); // Too small.