Hi, I was looking at Scott's patches, but was uncomfortable about the fact that there is very little coverage of DBusServer (outside of the bus itself) and dbus_shutdown() right now. Attached are 4 patches. The first separates the test-utils.[ch] into a separate noinst libtool library and creates a test-shutdown.c test that calls dbus_shutdown and also reinitializes. The second patch adds utility functions for setting up a DBusServer with DBusLoop, matching the code for connections. The third patch is trivial changes for the first which if I knew Git better I would have merged. The fourth patch finally uses this infrastructure to create a "PrivServer" test which excercises DBusServer and dbus_shutdown and we can start to reproduce the problems Scott is hitting.
Created attachment 16827 [details] [review] Add-a-test-shutdown-test-with-some-test-infrastruct.patch
Created attachment 16828 [details] [review] Add-test-library-functions-for-using-DBusServer.patch
Created attachment 16829 [details] [review] Small-tweaks-to-shutdown-test.patch
Created attachment 16830 [details] [review] Add-PrivServer-test-which-uses-DBusServer.patch
These all look good. Look at the docs for interactive git-rebase to merge the two patches and fix up your commit messages. The commit messages should have the header then a regular changelog entry with a listing of each file that changed and what changed in them. For the most part it is new files or functions so you can just say "added new file" for those and give a brief description. If you can fix that up then feel free to commit to head and the dbus-1.2-branch branch. Don't forget to push --all after you are done. If you need any help with git commands just ask or talk to the X guys as they are using it in more detail than we are.
I should note you can commit all your patches to the master branch and then branch the remote 1.2 branch: git checkout -b dbus-1.2-branch origin/dbus-1.2-branch and then use git-cherrypick to commit those patches. Only bug fixes should be moved over to the 1.2 branch.
Committed to HEAD on master, I haven't moved them over to dbus-1.2. commit 5e359834f28b0580e7b79a057614d4e3592709ac Author: Colin Walters <walters@verbum.org> Date: Fri May 30 17:11:15 2008 -0400 Add "PrivServer" test which exercises DBusServer and dbus_shutdown * test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in: New service file for PrivServer. * configure.in: Generate it. * test/name-test/Makefile.am: Build test-privserver and test-privserver-client. * test/name-test/test-privserver.c: Use DBusServer to serve a private connection. * test/name-test/test-privserver-client.c: Connect via session bus and get address of private server, exercise dbus_shutdown(). * test/name-test/run-test.sh: Run it. commit a73a79a155e97a3bd0d3ce5001ca6b9db803eeeb Author: Colin Walters <walters@verbum.org> Date: Fri May 30 16:53:35 2008 -0400 Add noinst convenience test library, add a test-shutdown * test/Makefile.am: New convenience library libdbus_testutils_la. Reorder build so that test/ gets built before test/name-test so name-test files can depend on it. * test/name-test/test-shutdown.c: New file, exercises dbus_shutdown () a bit. * test/name-test/run-test.sh Run test-shutdown. * test/test-utils.h: In some cases we already have DBUS_COMPILATION defined, avoid double definition warning. commit 9d8989cfec02e6ca41f8ffa0ccda16c93ddcb23c Author: Colin Walters <walters@verbum.org> Date: Fri May 30 10:33:18 2008 -0400 Add test library functions for using DBusServer * test/test-utils.h, test/test-utils.c: Add functions which hook up a DBusServer to a DBusLoop, useful for test cases.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.