mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 04:50:30 +01:00
Merge branch 'lr/rpm-make-check'
https://bugzilla.gnome.org/show_bug.cgi?id=739127
This commit is contained in:
commit
48b4f6f830
11 changed files with 62 additions and 21 deletions
|
|
@ -30,10 +30,10 @@ test_dispatcher_envp_LDADD = \
|
|||
|
||||
TESTS = test-dispatcher-envp
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST= \
|
||||
dispatcher-old-down \
|
||||
dispatcher-old-up \
|
||||
dispatcher-old-vpn-down \
|
||||
dispatcher-old-vpn-up
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -166,6 +166,9 @@ BuildRequires: ModemManager-glib-devel >= 1.0
|
|||
%if 0%{?with_nmtui}
|
||||
BuildRequires: newt-devel
|
||||
%endif
|
||||
BuildRequires: /usr/bin/dbus-launch
|
||||
BuildRequires: pygobject3-base
|
||||
BuildRequires: dbus-python
|
||||
|
||||
|
||||
%description
|
||||
|
|
@ -469,6 +472,10 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.d
|
|||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
|
||||
%post
|
||||
%systemd_post NetworkManager.service NetworkManager-wait-online.service NetworkManager-dispatcher.service
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Spawn DBus if there's none
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
exec dbus-launch --exit-with-session "$@"
|
||||
else
|
||||
exec "$@"
|
||||
eval `dbus-launch --sh-syntax`
|
||||
trap "kill $DBUS_SESSION_BUS_PID" EXIT
|
||||
fi
|
||||
|
||||
"$@"
|
||||
|
|
|
|||
|
|
@ -1591,11 +1591,17 @@ _nm_object_reload_properties_async (NMObject *object, GAsyncReadyCallback callba
|
|||
gboolean
|
||||
_nm_object_reload_properties_finish (NMObject *object, GAsyncResult *result, GError **error)
|
||||
{
|
||||
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
|
||||
GSimpleAsyncResult *simple;
|
||||
|
||||
g_return_val_if_fail (NM_IS_OBJECT (object), FALSE);
|
||||
g_return_val_if_fail (g_simple_async_result_is_valid (result, G_OBJECT (object), _nm_object_reload_properties_async), FALSE);
|
||||
|
||||
/* NM might have disappeared meanwhile. That would cause a NoReply error to be emitted,
|
||||
* but we don't care if property updates were disabled. */
|
||||
if (priv->suppress_property_updates)
|
||||
return TRUE;
|
||||
|
||||
simple = G_SIMPLE_ASYNC_RESULT (result);
|
||||
if (g_simple_async_result_propagate_error (simple, error))
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Spawn DBus if there's none
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
exec dbus-launch --exit-with-session "$@"
|
||||
else
|
||||
exec "$@"
|
||||
eval `dbus-launch --sh-syntax`
|
||||
trap "kill $DBUS_SESSION_BUS_PID" EXIT
|
||||
fi
|
||||
|
||||
"$@"
|
||||
|
|
|
|||
|
|
@ -892,6 +892,8 @@ client_devices_changed_cb (GObject *client,
|
|||
|
||||
devices = nm_client_get_devices (NM_CLIENT (client));
|
||||
g_assert (devices != NULL);
|
||||
if (devices->len < 2)
|
||||
return;
|
||||
g_assert_cmpint (devices->len, ==, 2);
|
||||
|
||||
if (NM_IS_DEVICE_VLAN (devices->pdata[0]))
|
||||
|
|
|
|||
|
|
@ -1742,15 +1742,36 @@ static gint64 monotonic_timestamp_offset_sec;
|
|||
static void
|
||||
monotonic_timestamp_get (struct timespec *tp)
|
||||
{
|
||||
static gboolean initialized = FALSE;
|
||||
int err;
|
||||
static int clock_mode = 0;
|
||||
gboolean first_time = FALSE;
|
||||
int err = 0;
|
||||
|
||||
err = clock_gettime (CLOCK_BOOTTIME, tp);
|
||||
switch (clock_mode) {
|
||||
case 0:
|
||||
/* the clock is not yet initialized (first run) */
|
||||
err = clock_gettime (CLOCK_BOOTTIME, tp);
|
||||
if (err == -1 && errno == EINVAL) {
|
||||
clock_mode = 2;
|
||||
err = clock_gettime (CLOCK_MONOTONIC, tp);
|
||||
} else
|
||||
clock_mode = 1;
|
||||
first_time = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
/* default, return CLOCK_BOOTTIME */
|
||||
err = clock_gettime (CLOCK_BOOTTIME, tp);
|
||||
break;
|
||||
case 2:
|
||||
/* fallback, return CLOCK_MONOTONIC. Kernels prior to 2.6.39
|
||||
* don't support CLOCK_BOOTTIME. */
|
||||
err = clock_gettime (CLOCK_MONOTONIC, tp);
|
||||
break;
|
||||
}
|
||||
|
||||
g_assert (err == 0); (void)err;
|
||||
g_assert (tp->tv_nsec >= 0 && tp->tv_nsec < NM_UTILS_NS_PER_SECOND);
|
||||
|
||||
if (G_LIKELY (initialized))
|
||||
if (G_LIKELY (!first_time))
|
||||
return;
|
||||
|
||||
/* Calculate an offset for the time stamp.
|
||||
|
|
@ -1767,7 +1788,6 @@ monotonic_timestamp_get (struct timespec *tp)
|
|||
* wraps (~68 years).
|
||||
**/
|
||||
monotonic_timestamp_offset_sec = (- ((gint64) tp->tv_sec)) + 1;
|
||||
initialized = TRUE;
|
||||
|
||||
if (nm_logging_enabled (LOGL_DEBUG, LOGD_CORE)) {
|
||||
time_t now = time (NULL);
|
||||
|
|
@ -1776,8 +1796,9 @@ monotonic_timestamp_get (struct timespec *tp)
|
|||
|
||||
strftime (s, sizeof (s), "%Y-%m-%d %H:%M:%S", localtime_r (&now, &tm));
|
||||
nm_log_dbg (LOGD_CORE, "monotonic timestamp started counting 1.%09ld seconds ago with "
|
||||
"an offset of %lld.0 seconds to CLOCK_BOOTTIME (local time is %s)",
|
||||
tp->tv_nsec, (long long) -monotonic_timestamp_offset_sec, s);
|
||||
"an offset of %lld.0 seconds to %s (local time is %s)",
|
||||
tp->tv_nsec, (long long) -monotonic_timestamp_offset_sec,
|
||||
clock_mode == 1 ? "CLOCK_BOOTTIME" : "CLOCK_MONOTONIC", s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ test_ibft_LDADD = \
|
|||
|
||||
TESTS = test-ibft
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
iscsiadm-test-dhcp \
|
||||
iscsiadm-test-static \
|
||||
|
|
@ -45,5 +47,3 @@ EXTRA_DIST = \
|
|||
iscsiadm-test-bad-record \
|
||||
iscsiadm-test-vlan
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ check_ifnet_LDADD = $(top_builddir)/src/libNetworkManager.la
|
|||
check-local: check_ifnet
|
||||
$(abs_builddir)/check_ifnet $(abs_srcdir) $(abs_builddir)
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
hostname \
|
||||
net \
|
||||
|
|
@ -42,5 +44,3 @@ EXTRA_DIST = \
|
|||
nm-system-settings.conf \
|
||||
wpa_supplicant.conf \
|
||||
test_ca_cert.pem
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ test_ifupdown_LDADD = \
|
|||
|
||||
TESTS = test-ifupdown
|
||||
|
||||
endif
|
||||
|
||||
EXTRA_DIST = \
|
||||
test1 test2 test3 test4 test5 test6 test7 test8 test9 test11 test12 \
|
||||
test13 test14 test15 test16 test17-wired-static-verify-ip4 \
|
||||
test18-wired-static-verify-ip6 test19-wired-static-verify-ip4-plen \
|
||||
test20-source-stanza test20-source-stanza.eth0 test20-source-stanza.eth1
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ test_nm_utils_kill_child (void)
|
|||
char *argv1[] = {
|
||||
"sh",
|
||||
"-c",
|
||||
"trap \"sleep 0.3; exit 10\" EXIT; "
|
||||
"sleep 100000; exit $? #" TEST_TOKEN,
|
||||
NULL,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue