From 7d50f2dde9c9926ef9aac366f5d2941213b4e6a5 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 4 Feb 2015 14:34:46 +0000 Subject: [PATCH 05/13] monitor regression test: verify that we lose previous match rules --- test/monitor.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/monitor.c b/test/monitor.c index 74ff452..d0d99fb 100644 --- a/test/monitor.c +++ b/test/monitor.c @@ -1060,6 +1060,16 @@ test_selective (Fixture *f, if (f->address == NULL) return; + /* Match rules added before becoming a monitor should be cleared: + * if they weren't, this test would get Interesting twice, then Tedious, + * and only see Fun after that. */ + dbus_bus_add_match (f->monitor, + "eavesdrop='true',interface='com.example.Interesting'", &f->e); + test_assert_no_error (&f->e); + dbus_bus_add_match (f->monitor, + "eavesdrop='true',interface='com.example.Tedious'", &f->e); + test_assert_no_error (&f->e); + become_monitor (f); m = dbus_message_new_signal ("/foo", "com.example.Interesting", -- 2.1.4