From 88a44cae26537c95188211a35901354e30ff16ce Mon Sep 17 00:00:00 2001 From: lijunlong Date: Sat, 17 Jan 2026 20:08:08 +0800 Subject: [PATCH 1/3] tests: install dnsmasq. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2a923a96..46f9b8a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,8 +46,11 @@ env: services: - memcache - redis-server + - dnsmasq before_install: + - echo "address=/localhost/127.0.0.1" | sudo tee -a /etc/dnsmasq.conf + - sudo service dnsmasq restart - wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add - - echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list - sudo apt-get update From 155fbada1e6a3c171c2a037ba56cff684c1cc232 Mon Sep 17 00:00:00 2001 From: lijunlong Date: Sun, 18 Jan 2026 08:36:45 +0800 Subject: [PATCH 2/3] use systemctl instead. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 46f9b8a3..26e87c50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,7 @@ services: before_install: - echo "address=/localhost/127.0.0.1" | sudo tee -a /etc/dnsmasq.conf - - sudo service dnsmasq restart + - sudo systemctl restart dnsmasq - wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add - - echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list - sudo apt-get update From f1fccb03935b39dbab7c35b8335943084cb00793 Mon Sep 17 00:00:00 2001 From: lijunlong Date: Sun, 18 Jan 2026 23:27:36 +0800 Subject: [PATCH 3/3] more test. --- .travis.yml | 4 +--- t/501-tcp-socket-timeout.t | 6 +++++- t/502-udp-socket-error.t | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26e87c50..dd915873 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,17 +40,15 @@ env: - JOBS=3 - NGX_BUILD_JOBS=$JOBS - TEST_NGINX_SLEEP=0.006 + - TEST_NGINX_SKIP_COSOCKET_LOG_TEST=1 matrix: - NGINX_VERSION=1.29.4 OPENSSL_VER=3.5.4 OPENSSL_PATCH_VER=3.5.4 services: - memcache - redis-server - - dnsmasq before_install: - - echo "address=/localhost/127.0.0.1" | sudo tee -a /etc/dnsmasq.conf - - sudo systemctl restart dnsmasq - wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add - - echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list - sudo apt-get update diff --git a/t/501-tcp-socket-timeout.t b/t/501-tcp-socket-timeout.t index 3a33d22c..769bef63 100644 --- a/t/501-tcp-socket-timeout.t +++ b/t/501-tcp-socket-timeout.t @@ -28,7 +28,11 @@ our $StapScript = $t::StapThread::StapScript; repeat_each(2); -plan tests => repeat_each() * (blocks() * 4 + 8); +if (defined $ENV{TEST_NGINX_SKIP_COSOCKET_LOG_TEST}) { + plan(skip_all => "Remove TEST_NGINX_SKIP_COSOCKET_LOG_TEST to enable this test"); +} else { + plan tests => repeat_each() * (blocks() * 4 + 8); +} our $HtmlDir = html_dir; diff --git a/t/502-udp-socket-error.t b/t/502-udp-socket-error.t index 539d06e4..74133196 100644 --- a/t/502-udp-socket-error.t +++ b/t/502-udp-socket-error.t @@ -4,7 +4,11 @@ use Test::Nginx::Socket::Lua::Stream; repeat_each(2); -plan tests => repeat_each() * (3 * blocks()); +if (defined $ENV{TEST_NGINX_SKIP_COSOCKET_LOG_TEST}) { + plan(skip_all => "Remove TEST_NGINX_SKIP_COSOCKET_LOG_TEST to enable this test"); +} else { + plan tests => repeat_each() * (3 * blocks()); +} our $HtmlDir = html_dir;