merge branch 'th/gitlab-ci-alpine' (part 4)

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/704
This commit is contained in:
Thomas Haller 2020-12-23 10:48:39 +01:00
commit d459be2dfa
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
10 changed files with 48 additions and 11 deletions

View file

@ -48,7 +48,7 @@ variables:
UBUNTU_TAG: '2020-11-17.0-45915bd6e380'
DEBIAN_TAG: '2020-11-17.0-45915bd6e380'
CENTOS_TAG: '2020-11-17.0-cbb87607d569'
ALPINE_TAG: '2020-11-17.0-8309a34970a3'
ALPINE_TAG: '2020-11-17.0-eafb903b544b'
FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh'
UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh'

View file

@ -21,6 +21,7 @@ apk add \
'gobject-introspection-dev' \
'gtk-doc' \
'intltool' \
'iproute2' \
'iptables' \
'jansson-dev' \
'libgudev-dev' \
@ -41,9 +42,11 @@ apk add \
'polkit-dev' \
'ppp' \
'ppp-dev' \
'py3-dbus' \
'py3-gobject3' \
'python3' \
'readline-dev' \
'util-linux-dev' \
'vala' \
'valgrind' \
'vim'

View file

@ -101,6 +101,12 @@ _with_valgrind() {
test "$_WITH_VALGRIND_CHECKED" == "1" && return 0
_WITH_VALGRIND_CHECKED=1
if [ "$IS_ALPINE" = 1 ]; then
# on Alpine we have no debug symbols and the suppressions
# don't work. Skip valgrind tests.
WITH_VALGRIND=0
fi
# Certain glib2 versions are known to report *lots* of leaks. Disable
# valgrind tests in this case.
# https://bugzilla.redhat.com/show_bug.cgi?id=1710417

View file

@ -127,6 +127,7 @@ _nm_log_get_max_level_realm(void)
#include <sys/syscall.h>
#include <sys/ioctl.h>
#include <pthread.h>
#define ENABLE_GSHADOW FALSE
@ -202,6 +203,17 @@ typedef __compar_fn_t comparison_fn_t;
typedef int (*__compar_d_fn_t)(const void *, const void *, void *);
#endif
#ifndef __GLIBC__
static inline int
__register_atfork(void (*prepare)(void),
void (*parent)(void),
void (*child)(void),
void *dso_handle)
{
return pthread_atfork(prepare, parent, child);
}
#endif
#endif /* (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_SYSTEMD */
/*****************************************************************************/

View file

@ -8,7 +8,6 @@
#include "nm-device.h"
#include <netinet/in.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <signal.h>
@ -16,8 +15,10 @@
#include <sys/wait.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <netinet/if_ether.h>
#include <linux/if.h>
#include <linux/if_addr.h>
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <linux/if_ether.h>
#include <linux/if_infiniband.h>

View file

@ -6,6 +6,7 @@
#include "nm-default.h"
#include <fcntl.h>
#include <netinet/if_ether.h>
#include <linux/if_tun.h>
#include <sys/ioctl.h>
#include <sys/stat.h>

View file

@ -12,9 +12,10 @@
#include <endian.h>
#include <fcntl.h>
#include <libudev.h>
#include <net/ethernet.h>
#include <linux/fib_rules.h>
#include <linux/ip.h>
#include <linux/if_arp.h>
#include <linux/if.h>
#include <linux/if_bridge.h>
#include <linux/if_link.h>
#include <linux/if_tun.h>
@ -24,6 +25,7 @@
#include <linux/tc_act/tc_mirred.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <net/if_arp.h>
#include <poll.h>
#include <sys/ioctl.h>
#include <sys/socket.h>

View file

@ -7,7 +7,11 @@
#include <errno.h>
#include <sys/ioctl.h>
#if 0 /* NM_IGNORED */
#include <linux/if_arp.h>
#else /* NM_IGNORED */
#include <net/if_arp.h>
#endif /* NM_IGNORED */
#include <linux/if_infiniband.h>
#include "sd-dhcp6-client.h"

View file

@ -334,7 +334,7 @@ do_test_nm_utils_kill_child(void)
* is a race here. */
NMTST_EXPECT_NM_ERROR(
"kill child process 'test-s-3-2' (*): failed due to unexpected return value -1 by waitpid "
"(No child processes, 10) after sending no signal (0)");
"(No child process*, 10) after sending no signal (0)");
test_nm_utils_kill_child_sync_do("test-s-3-2", pid3s, 0, 0, FALSE, NULL);
NMTST_EXPECT_NM_DEBUG("kill child process 'test-s-4' (*): waiting up to 1 milliseconds for "
@ -397,7 +397,7 @@ do_test_nm_utils_kill_child(void)
* is a race here. */
NMTST_EXPECT_NM_ERROR(
"kill child process 'test-a-3-2' (*): failed due to unexpected return value -1 by waitpid "
"(No child processes, 10) after sending no signal (0)");
"(No child process*, 10) after sending no signal (0)");
NMTST_EXPECT_NM_DEBUG(
"kill child process 'test-a-3-2' (*): invoke callback: killing child failed");
test_nm_utils_kill_child_async_do("test-a-3-2", pid3a, 0, 0, FALSE, NULL);

View file

@ -980,10 +980,11 @@ test_connection_match_ip6_routes(void)
g_assert(matched == copy);
}
#define do_test_wildcard_match(str, result, ...) \
g_assert( \
nm_wildcard_match_check(str, (const char *const[]){__VA_ARGS__}, NM_NARG(__VA_ARGS__)) \
== result);
#define do_test_wildcard_match_eval(str, ...) \
nm_wildcard_match_check(str, (const char *const[]){__VA_ARGS__}, NM_NARG(__VA_ARGS__))
#define do_test_wildcard_match(str, result, ...) \
g_assert(do_test_wildcard_match_eval(str, __VA_ARGS__) == result)
static void
test_wildcard_match(void)
@ -1056,7 +1057,14 @@ test_wildcard_match(void)
do_test_wildcard_match("name3", TRUE, "name[123]");
do_test_wildcard_match("name4", FALSE, "name[123]");
do_test_wildcard_match("[a]", TRUE, "\\[a\\]");
if (do_test_wildcard_match_eval("[a]", "\\[a\\]") != TRUE) {
#if defined(__GLIBC__)
do_test_wildcard_match("[a]", TRUE, "\\[a\\]");
g_assert_not_reached();
#endif
/* It seems musl's fnmatch() does not like such ranges. */
g_test_skip("libc does not support ranges with fnmatch()!!");
}
do_test_wildcard_match("aa", FALSE, "!a*");
do_test_wildcard_match("aa", FALSE, "&!a*");