diff options
author | Simon McVittie <smcv@collabora.com> | 2017-12-12 14:05:20 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-01-11 18:35:36 +0000 |
commit | 0fb9eaa3d4ddeb0ee779029a379417bf813670f1 (patch) | |
tree | c1b8bb98f8ddab3fef076bc55c2bb68cf4bc655e /test/dbus-daemon.c | |
parent | 9bb330d82ab2bf60b5ec27b2b3e01d40d872243e (diff) | |
download | dbus-0fb9eaa3d4ddeb0ee779029a379417bf813670f1.tar.gz |
tests: Assert that dbus-daemon filters unknown header fields
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/dbus-daemon.c')
-rw-r--r-- | test/dbus-daemon.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index 9305866b..7f990a7e 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -1594,6 +1594,7 @@ check_features (DBusMessageIter *var_iter) { DBusMessageIter arr_iter; gboolean have_systemd_activation = FALSE; + gboolean have_header_filtering = FALSE; g_assert_cmpint (dbus_message_iter_get_arg_type (var_iter), ==, DBUS_TYPE_ARRAY); @@ -1611,12 +1612,15 @@ check_features (DBusMessageIter *var_iter) g_test_message ("Feature: %s", feature); - if (g_strcmp0 (feature, "SystemdActivation") == 0) + if (g_strcmp0 (feature, "HeaderFiltering") == 0) + have_header_filtering = TRUE; + else if (g_strcmp0 (feature, "SystemdActivation") == 0) have_systemd_activation = TRUE; dbus_message_iter_next (&arr_iter); } + g_assert_true (have_header_filtering); /* We pass --systemd-activation to the daemon for this unit test on Unix * (it can only work in practice on Linux, but there's nothing * inherently Linux-specific about the protocol). */ |