aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-11-21 08:38:56 -0500
committerGitHub <noreply@github.com>2024-11-21 08:38:56 -0500
commitd05744e3ed362aae366f98d2c63242cd453468df (patch)
treeb952aad9b6800676f25701e85c8b0fd3244f6cac /test
parent1b084f7bbe4ae6d90e06600d789126f3b37941d8 (diff)
downloadlibuv-d05744e3ed362aae366f98d2c63242cd453468df.tar.gz
libuv-d05744e3ed362aae366f98d2c63242cd453468df.zip
build(deps): bump actions/checkout from 3 to 4 (#4490)
Requires updating the android builder, since the arm emulator is deprecated and unavailable now. Switch to using a Github Action plugin instead of a container, so that hopefully future updates will be delivered via that channel instead. Changed the idna test since printf returns EILSEQ for some byte sequences in the format on Android in glibc. We don't fully understand the cause, but we can avoid that by not asking it to reencode the bytes in the current locale settings.
Diffstat (limited to 'test')
-rw-r--r--test/test-idna.c14
-rw-r--r--test/test-udp-multicast-join.c4
2 files changed, 11 insertions, 7 deletions
diff --git a/test/test-idna.c b/test/test-idna.c
index 4a165573..46df9f3c 100644
--- a/test/test-idna.c
+++ b/test/test-idna.c
@@ -39,7 +39,7 @@ TEST_IMPL(utf8_decode1) {
/* Two-byte sequences. */
p = b;
- snprintf(b, sizeof(b), "\xC2\x80\xDF\xBF");
+ snprintf(b, sizeof(b), "%s", "\xC2\x80\xDF\xBF");
ASSERT_EQ(128, uv__utf8_decode1(&p, b + sizeof(b)));
ASSERT_PTR_EQ(p, b + 2);
ASSERT_EQ(0x7FF, uv__utf8_decode1(&p, b + sizeof(b)));
@@ -47,7 +47,7 @@ TEST_IMPL(utf8_decode1) {
/* Three-byte sequences. */
p = b;
- snprintf(b, sizeof(b), "\xE0\xA0\x80\xEF\xBF\xBF");
+ snprintf(b, sizeof(b), "%s", "\xE0\xA0\x80\xEF\xBF\xBF");
ASSERT_EQ(0x800, uv__utf8_decode1(&p, b + sizeof(b)));
ASSERT_PTR_EQ(p, b + 3);
ASSERT_EQ(0xFFFF, uv__utf8_decode1(&p, b + sizeof(b)));
@@ -55,7 +55,7 @@ TEST_IMPL(utf8_decode1) {
/* Four-byte sequences. */
p = b;
- snprintf(b, sizeof(b), "\xF0\x90\x80\x80\xF4\x8F\xBF\xBF");
+ snprintf(b, sizeof(b), "%s", "\xF0\x90\x80\x80\xF4\x8F\xBF\xBF");
ASSERT_EQ(0x10000, uv__utf8_decode1(&p, b + sizeof(b)));
ASSERT_PTR_EQ(p, b + 4);
ASSERT_EQ(0x10FFFF, uv__utf8_decode1(&p, b + sizeof(b)));
@@ -63,7 +63,7 @@ TEST_IMPL(utf8_decode1) {
/* Four-byte sequences > U+10FFFF; disallowed. */
p = b;
- snprintf(b, sizeof(b), "\xF4\x90\xC0\xC0\xF7\xBF\xBF\xBF");
+ snprintf(b, sizeof(b), "%s", "\xF4\x90\xC0\xC0\xF7\xBF\xBF\xBF");
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
ASSERT_PTR_EQ(p, b + 4);
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
@@ -71,7 +71,7 @@ TEST_IMPL(utf8_decode1) {
/* Overlong; disallowed. */
p = b;
- snprintf(b, sizeof(b), "\xC0\x80\xC1\x80");
+ snprintf(b, sizeof(b), "%s", "\xC0\x80\xC1\x80");
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
ASSERT_PTR_EQ(p, b + 2);
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
@@ -79,7 +79,7 @@ TEST_IMPL(utf8_decode1) {
/* Surrogate pairs; disallowed. */
p = b;
- snprintf(b, sizeof(b), "\xED\xA0\x80\xED\xA3\xBF");
+ snprintf(b, sizeof(b), "%s", "\xED\xA0\x80\xED\xA3\xBF");
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
ASSERT_PTR_EQ(p, b + 3);
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
@@ -87,7 +87,7 @@ TEST_IMPL(utf8_decode1) {
/* Simply illegal. */
p = b;
- snprintf(b, sizeof(b), "\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
+ snprintf(b, sizeof(b), "%s", "\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF");
for (i = 1; i <= 8; i++) {
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b)));
diff --git a/test/test-udp-multicast-join.c b/test/test-udp-multicast-join.c
index 6d3bca5b..58b05556 100644
--- a/test/test-udp-multicast-join.c
+++ b/test/test-udp-multicast-join.c
@@ -169,6 +169,10 @@ TEST_IMPL(udp_multicast_join) {
if (r == UV_ENOEXEC)
RETURN_SKIP("No multicast support (likely a firewall issue).");
ASSERT_OK(r);
+#if defined(__ANDROID__)
+ /* It returns an ENOSYS error */
+ RETURN_SKIP("Test does not currently work in ANDROID");
+#endif
r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb);
ASSERT_OK(r);