summaryrefslogtreecommitdiff
path: root/source3/torture/test_messaging_read.c
Commit message (Collapse)AuthorAgeFilesLines
* torture3: Extend read3 for the "messaging target re-inits" failureVolker Lendecke2019-02-141-20/+24
| | | | | | | | | | Do ping_pong a hundred times, re-initializing the msg_ctx every time. https://bugzilla.samba.org/show_bug.cgi?id=13786 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* messaging: Deliver messages only onceVolker Lendecke2017-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | This survived an autobuild, so no subsystem strictly needs this anymore. In particular the notify subsystem has been rewritten. Why this patch? It removes some complexity from core code, and it reduces the potential memory overconsumption: Right now I'm working on a g_lock_ping_pong test. This test does a lot of messaging_filtered_read_send calls in a tight loop on a nested event context. With the current code we let the messaging_filtered_read code consume the message that arrives, but it also posts it for consumption by the main event context attached to the messaging context with its "classic" callback. This test never comes back to the main event context, so it accumulates more and more self-posted messages. That's just unnecessary, given that due to the successful autobuild nothing but the read1 test makes use of the "multicasting" of messages. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 21 07:30:39 CEST 2017 on sn-devel-144
* torture3: Fix a typoVolker Lendecke2015-01-061-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* messaging3: Avoid self-send complexityVolker Lendecke2014-12-091-1/+1
| | | | | | | | | | | | | | | | | With the notify code I've hit another case where self-sends caused a problem. This time messages were lost because we tried to do multiple dispatch_rec calls from within a single inotify callback. Only the first one was being taken care of, the others did not find receivers. This patch makes self-sends go through the kernel as well, the kernel queues everything nicely for us. With dgram messaging this should be pretty fast. If it turns out to be a performance problem, we can solve it later by doing proper queueing in user space. We need to completely decouple any processing from callbacks. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:torture: add LOCAL-MESSAGING-READ4 - send 1MB messageMichael Adam2014-09-301-0/+230
| | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:torture: in LOCAL-MESSAGING-READ3, print some messages to childMichael Adam2014-09-241-0/+5
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Sep 24 11:09:43 CEST 2014 on sn-devel-104
* s3:torture: in LOCAL-MESSAGING-READ3, tell child to exit and waitMichael Adam2014-09-241-0/+17
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture3: local-messaging-read3Volker Lendecke2014-05-081-0/+200
| | | | | | | | | | | | | | | This is a testcase for the rpc-style messaging nested event context. We have to fork here: The nested event context does not reply to the PING message, it only listens for the PONG response. But that's the point of the patches: Correctly pick just one message in a nested event context. I think this is the best we can do with nested event contexts. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu May 8 11:32:44 CEST 2014 on sn-devel-104
* messaging3: Push down the self-send callbackVolker Lendecke2014-05-081-1/+1
| | | | | | | | | | | | | | | In the messaging_read receivers we already defer the callback: We need to reply on potentially different tevent contexts, thus the defer_callback. The callback case in messaging_dispatch_rec was direct before this patch. This changes messaging_dispatch_rec to also defer the callback in the self-send case. Now we need only two roundtrips in local-messaging-read1 :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture3: Fix local-messaging-read1Volker Lendecke2014-05-081-3/+6
| | | | | | | | | Now that we defer requests in dispatch_rec, we need 3 rounds to finish the requests Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture3: Add a test deleting a different reqVolker Lendecke2014-04-301-0/+103
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Apr 30 17:09:59 CEST 2014 on sn-devel-104
* torture3: Add local-messaging-read1Volker Lendecke2014-04-301-0/+144
This covers deleting and re-adding a request in a callback Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>