From e40b82ff87a8476ea5d58b9cee0475c6faf5832b Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sat, 14 Jan 2023 11:45:30 +0800 Subject: [PATCH 1/2] [darwin] Uncomment testing in ci --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4eeea8be..8edbf8e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -89,8 +89,7 @@ jobs: - run: name: Test command: | - # TODO: blocked by issue #236 - # bash ./check.bash darwin + bash ./check.bash darwin - run: name: Build using autotools command: | @@ -99,6 +98,7 @@ jobs: ./configure make make install + make check # Invoke jobs via workflows # See: https://circleci.com/docs/2.0/configuration-reference/#workflows From 9bb3e71c79caf81e2b1ce6a5572609943a5a6766 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Sat, 14 Jan 2023 11:52:05 +0800 Subject: [PATCH 2/2] [darwin] Fallback to localhost in LTsock --- tests/LTsock.c | 14 +++++++++----- tests/TestDB | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/LTsock.c b/tests/LTsock.c index bc0750f3..cb8e94a2 100644 --- a/tests/LTsock.c +++ b/tests/LTsock.c @@ -261,11 +261,15 @@ main(argc, argv) } hnm[sizeof(hnm) - 1] = '\0'; if (!(hp = gethostbyname(hnm))) { - (void) snprintf(buf, bufl - 1, "ERROR!!! can't get IP address for %s", - hnm); - buf[bufl - 1] = '\0'; - cem = buf; - goto print_errno; + // fallback to localhost if hostname cannot be resolved + strcpy(hnm, "localhost"); + if (!(hp = gethostbyname(hnm))) { + (void) snprintf(buf, bufl - 1, "ERROR!!! can't get IP address for %s", + hnm); + buf[bufl - 1] = '\0'; + cem = buf; + goto print_errno; + } } (void) memset((void *)&Myad, 0, sizeof(Myad)); if ((ti = hp->h_length) > sizeof(Myad.sin_addr)) diff --git a/tests/TestDB b/tests/TestDB index 15ad9a40..1778add1 100644 --- a/tests/TestDB +++ b/tests/TestDB @@ -145,3 +145,4 @@ LT_BIGF LT_CC LT_DEV64 LT_DIAL_freebsd LT_KMEM LT_VERS=13000 LT_BIGF LT_CC LT_DIAL_linux LT_VERS=50009 _FILE_OFFSET_BITS=64 LT_BIGF LT_CC LT_DIAL_linux LT_VERS=60005 _FILE_OFFSET_BITS=64 LT_CC LT_DIAL_darwin LT_VERS=1900 +LT_BIGF LT_CC LT_DIAL_darwin LT_VERS=1900