Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
0046e0b7
Commit
0046e0b7
authored
1 year ago
by
Celeste
Committed by
J0WI
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
main/c-ares: upgrade to 1.24.0
parent
114db323
No related branches found
No related tags found
1 merge request
!57463
main/c-ares: upgrade to 1.24.0
Pipeline
#203014
skipped
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/c-ares/APKBUILD
+7
-3
7 additions, 3 deletions
main/c-ares/APKBUILD
main/c-ares/fix-tests-symbol-hiding.patch
+108
-0
108 additions, 0 deletions
main/c-ares/fix-tests-symbol-hiding.patch
with
115 additions
and
3 deletions
main/c-ares/APKBUILD
+
7
−
3
View file @
0046e0b7
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname
=
c-ares
pkgname
=
c-ares
pkgver
=
1.2
3
.0
pkgver
=
1.2
4
.0
pkgrel
=
0
pkgrel
=
0
pkgdesc
=
"Asynchronous DNS/names resolver library"
pkgdesc
=
"Asynchronous DNS/names resolver library"
url
=
"https://c-ares.org/"
url
=
"https://c-ares.org/"
arch
=
"all"
arch
=
"all"
license
=
"MIT"
license
=
"MIT"
makedepends
=
"gtest-dev"
subpackages
=
"
$pkgname
-doc
$pkgname
-static
$pkgname
-dev
$pkgname
-utils::noarch"
subpackages
=
"
$pkgname
-doc
$pkgname
-static
$pkgname
-dev
$pkgname
-utils::noarch"
source
=
"https://c-ares.haxx.se/download/c-ares-
$pkgver
.tar.gz"
source
=
"https://c-ares.haxx.se/download/c-ares-
$pkgver
.tar.gz
fix-tests-symbol-hiding.patch
"
# secfixes:
# secfixes:
# 1.17.2-r0:
# 1.17.2-r0:
...
@@ -41,5 +44,6 @@ utils() {
...
@@ -41,5 +44,6 @@ utils() {
}
}
sha512sums
=
"
sha512sums
=
"
0302fe809118bc81310c4f5ca4bbea3e2aee262da2c44ad6266d9da05e9326452f274508685974ff8aa6fce8332a2862008c12fbbc2917af258daa90b69567f0 c-ares-1.23.0.tar.gz
3701853e263de94daf19734185ad913848c19b825e0738926b418a54b0628ee1ac95a49ebfaa2ddf3eed74a7ef209e1a0a8f573df3e507ef1f11fcc53fc5eb68 c-ares-1.24.0.tar.gz
136b4e7a1988709e2ec96638e0ca546b1a3100cd0047d9ffb35344b7e1a4486fc7e0df2faee1096d51bf2056701d0e21b6786ea2662fca1de4f264b29939949c fix-tests-symbol-hiding.patch
"
"
This diff is collapsed.
Click to expand it.
main/c-ares/fix-tests-symbol-hiding.patch
0 → 100644
+
108
−
0
View file @
0046e0b7
Patch-Source: https://github.com/c-ares/c-ares/commit/7dd384a99cc385e408e64c3e0af4e0e2136ed034.patch
--
From 7dd384a99cc385e408e64c3e0af4e0e2136ed034 Mon Sep 17 00:00:00 2001
From: Brad House <brad@brad-house.com>
Date: Sun, 17 Dec 2023 08:16:24 -0500
Subject: [PATCH] fix test building with symbol hiding
New test cases depend on internal symbols for calculating timeouts.
Disable those test features if symbol hiding is enabled.
Fixes Bug: #664
Fix By: Brad House (@bradh352)
---
test/ares-test-mock-ai.cc | 2 ++
test/ares-test-mock.cc | 4 ++--
test/ares-test.cc | 12 ++++++++++++
3 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/test/ares-test-mock-ai.cc b/test/ares-test-mock-ai.cc
index c55676f6c..57b9d5ee2 100644
--- a/test/ares-test-mock-ai.cc
+++ b/test/ares-test-mock-ai.cc
@@ -442,6 +442,7 @@
TEST_P(MockChannelTestAI, FamilyV6) {
EXPECT_THAT(result.ai_, IncludesV6Address("2121:0000:0000:0000:0000:0000:0000:0303"));
}
+#ifndef CARES_SYMBOL_HIDING
// Test case for Issue #662
TEST_P(MockChannelTestAI, PartialQueryCancel) {
std::vector<byte> nothing;
@@ -469,6 +470,7 @@
TEST_P(MockChannelTestAI, PartialQueryCancel) {
EXPECT_TRUE(result.done_);
EXPECT_EQ(ARES_ECANCELLED, result.status_);
}
+#endif
TEST_P(MockChannelTestAI, FamilyV4) {
DNSPacket rsp4;
diff --git a/test/ares-test-mock.cc b/test/ares-test-mock.cc
index 6afa8f989..849eb6980 100644
--- a/test/ares-test-mock.cc
+++ b/test/ares-test-mock.cc
@@ -826,7 +826,7 @@
TEST_P(MockChannelTest, V4WorksV6Timeout) {
EXPECT_EQ("{'www.google.com' aliases=[] addrs=[1.2.3.4]}", ss.str());
}
-
+#ifndef CARES_SYMBOL_HIDING
// Test case for Issue #662
TEST_P(MockChannelTest, PartialQueryCancel) {
std::vector<byte> nothing;
@@ -849,7 +849,7 @@
TEST_P(MockChannelTest, PartialQueryCancel) {
EXPECT_TRUE(result.done_);
EXPECT_EQ(ARES_ECANCELLED, result.status_);
}
-
+#endif
TEST_P(MockChannelTest, UnspecifiedFamilyV6) {
DNSPacket rsp6;
diff --git a/test/ares-test.cc b/test/ares-test.cc
index faad01486..3a55b73d3 100644
--- a/test/ares-test.cc
+++ b/test/ares-test.cc
@@ -105,6 +105,8 @@
void ProcessWork(ares_channel_t *channel,
unsigned int cancel_ms) {
int nfds, count;
fd_set readers, writers;
+
+#ifndef CARES_SYMBOL_HIDING
struct timeval tv_begin = ares__tvnow();
struct timeval tv_cancel = tv_begin;
@@ -113,10 +115,18 @@
void ProcessWork(ares_channel_t *channel,
tv_cancel.tv_sec += (cancel_ms / 1000);
tv_cancel.tv_usec += ((cancel_ms % 1000) * 1000);
}
+#else
+ if (cancel_ms) {
+ std::cerr << "library built with symbol hiding, can't test with cancel support" << std::endl;
+ return;
+ }
+#endif
while (true) {
+#ifndef CARES_SYMBOL_HIDING
struct timeval tv_now = ares__tvnow();
struct timeval tv_remaining;
+#endif
struct timeval tv;
struct timeval *tv_select;
@@ -142,6 +152,7 @@
void ProcessWork(ares_channel_t *channel,
if (tv_select == NULL)
return;
+#ifndef CARES_SYMBOL_HIDING
if (cancel_ms) {
unsigned int remaining_ms;
ares__timeval_remaining(&tv_remaining,
@@ -157,6 +168,7 @@
void ProcessWork(ares_channel_t *channel,
tv_select = ares_timeout(channel, &tv_remaining, &tv);
}
}
+#endif
count = select(nfds, &readers, &writers, nullptr, tv_select);
if (count < 0) {
This diff is collapsed.
Click to expand it.
Natanael Copa
@ncopa
mentioned in commit
e7292082
·
11 months ago
mentioned in commit
e7292082
mentioned in commit e72920820e86dc995aac0ff0b4fdb5f809d30a5b
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment