summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gsettings/: adjust to GSettingsBackend API changeswip/settings-backendRyan Lortie2012-07-294-101/+391
|
* GDBus thread backend: fix obscure race conditionRyan Lortie2012-07-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was possible for outgoing messages to be delivered in the wrong order due to an annoying race condition when dealing with delivery of "fast" change messages. This was hitting the in-order assertion on return of those messages. The race goes like this: - a write is requested from the main thread (1 in-flight, 0 pending) - the reply for this first change message comes back (but is not yet handled). - another write is requested from the main thread and immediately placed in-flight (with an idle on the worker thread for actually sending it). 2 in-flight, 0 pending. - a third write is requested from the main thread but goes to the pending queue (since the in-flight queue is full). 2 in-flight, 1 pending. - the reply for the first change message is now handled in the worker thread, removing the first change from the in-flight queue. The queue management sees the third write in the pending queue and promotes it to the in-flight queue (properly following the second write) but sends the message immediately since it's already in the worker thread (leapfrogging the second write which is still waiting in an idle). - the idle for the second write runs We solve this problem by dispatching all writes via idles, even if we're already in the worker thread.
* engine: improve robustness of profile parsingRyan Lortie2012-07-195-20/+58
| | | | | | | | | Checking for 'u' or 's' is really insanely silly from a robustness standpoint. Ensure that we properly have "user-db:" or "system-db:" and that a non-empty database name is given, warning if not. This was specifically causing annoying problems with the profile file that gdm was installing, so add a copy of that file to our testcases.
* service: remove ancient migration codeRyan Lortie2012-07-161-35/+2
| | | | | | | | A long time ago before dconf supported profiles, the user database file was called ~/.config/dconf. We've had migration code to rename it to ~/.config/dconf/user for two years now. Drop that code.
* dconf 0.13.40.13.4Ryan Lortie2012-07-161-0/+21
|
* dbus1/: fix malloc() off-by-one errorRyan Lortie2012-07-161-1/+1
| | | | | Make sure we allocate enough room for the NULL at the end of the gchar**.
* tests/: remove dbus1 and gsettings programsRyan Lortie2012-07-164-766/+1
| | | | | These old programs aren't part of the test suite and they're not very useful now that we have proper testcases.
* dbus-1/: fix transmission of byte arraysRyan Lortie2012-07-162-1/+13
| | | | Add a test case that would have caught this problem.
* tests/: fix some leaksRyan Lortie2012-07-162-1/+5
|
* tests/: test sync watch calls on the engineRyan Lortie2012-07-162-3/+73
|
* tests/: test "fast" signal subscriptionRyan Lortie2012-07-161-1/+76
| | | | Test the normal case, plus the race condition case.
* tests/: improve DBus mock interfaceRyan Lortie2012-07-163-7/+26
| | | | | Put the queue of the outstanding async calls in the header and add an interface for defining handlers for sync calls.
* tests/: test reading from various profile setupsRyan Lortie2012-07-153-6/+330
| | | | | | | | | | | Add a testcase that tests the engine by reading from an exhaustive combination of different profile types and states (missing databases, empty databases, databases with values, databases with locks, etc). Among other things, this makes sure the lockdown logic is sane. This is the testcase that caught the bug fixed in the last commit (listing with a missing database file).
* engine: fix dconf_engine_list() with empty dbRyan Lortie2012-07-151-0/+3
| | | | | | | | If we opened an empty database file (like on first login) and did a 'dconf list' on it then we would crash (due to accessing the GVDB without checking for NULL). Add a check.
* Bump the version numberRyan Lortie2012-07-151-1/+1
| | | | | If components are going to update themselves to the new version of the libdconf API then they should be able to depend on it by version number.
* engine: bring back origin_tag logicRyan Lortie2012-07-156-14/+22
| | | | | | | | | The GSettings backend still wants to use this and it does us no harm to have it on the engine API (which is only visible internally). Adjust the various consumers of the engine to the new API. Thanks to Rui Matos for reminding me about this...
* engine: fix arguments in fast watch race caseRyan Lortie2012-07-151-1/+3
| | | | | | In the case we do a fast watch and hit the race condition of a change occuring before our watch is established we need to emit a change signal on "/". The arguments for that were incorrect, so fix them.
* Install dconf CLI bash completion in /usr/shareRyan Lortie2012-07-152-2/+2
| | | | | | | | | | | Some short while ago the maintainers of bash-completion came to the pretty reasonable conclusion that completion files are not configuration data and therefore should be stored in /usr/share rather than /etc. The /etc path was kept for backwards compatibility, but we should really get with the new system. https://bugzilla.gnome.org/show_bug.cgi?id=678536
* Don't return a value from a void functionBrian Cameron2012-07-151-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676619
* make sure to dist dconf-mock.hRyan Lortie2012-07-151-0/+1
|
* Revert "build: Note we don't support srcdir != builddir"Ryan Lortie2012-07-151-5/+0
| | | | This reverts commit 3bd2e9c8c37468eec6067a40ef2e66ef7372ac43.
* Fixup srcdir != builddir fallout from last commitRyan Lortie2012-07-152-2/+2
|
* tweak public header installationRyan Lortie2012-07-154-11/+12
| | | | | Colin noticed that this was totally broken (from an ostree build). Fix it up.
* Fail to generate coverage report if tests failRyan Lortie2012-07-151-5/+5
| | | | We'll get an incomplete report in that case anyway...
* build: Note we don't support srcdir != builddirColin Walters2012-07-141-0/+5
|
* Merge branch 'wip/reorg'Ryan Lortie2012-07-13108-2974/+8060
|\ | | | | | | | | | | | | Conflicts: bin/dconf-dump.vala configure.ac editor/Makefile.am
| * test/: finish testing of system sourceRyan Lortie2012-07-131-6/+31
| | | | | | | | | | Use the invalidation capabilities of the mock gvdb backend to test that the system source handles reopening properly.
| * tests/ Rework the gvdb mock codeRyan Lortie2012-07-133-45/+81
| | | | | | | | Support a table being marked as no-longer-valid.
| * engine/: don't check for writability on resetRyan Lortie2012-07-121-1/+4
| | | | | | | | | | Resetting keys should absolutely always succeed, so don't check for key writability in that case.
| * tests/: add test for system sourceRyan Lortie2012-07-121-0/+60
| |
| * DConfEngineSource: return FALSE from NULL refreshRyan Lortie2012-07-122-1/+21
| | | | | | | | | | | | | | | | | | | | In the case that we call dconf_engine_source_refresh() on a source that had a NULL database and the result is that we still have a NULL database, return FALSE. This will prevent the unnecessary bumping of the state counter when there was really no change. This happens in the case of a missing system database file.
| * DConfEngineSource: remove the external init callRyan Lortie2012-07-124-16/+3
| | | | | | | | | | Always do init as part of the process of dconf_engine_source_new() to avoid the consumer from having to call it for themselves.
| * DConfEngineUserSource: don't open on initRyan Lortie2012-07-121-5/+0
| | | | | | | | | | Don't open the database file on _init(). This makes us match the system source better.
| * engine/: source init can never failRyan Lortie2012-07-125-12/+7
| | | | | | | | | | Stop returning a boolean here (since all of the sources always returned TRUE all the time anyway).
| * tests/: add more testing code for engineRyan Lortie2012-07-124-8/+270
| | | | | | | | | | | | | | Add an initial implementation of the gvdb mocking support and improve the existing shm mock by adding logging. Use these new features to test the 'user' DConfEngineSource.
| * tests/: implement more realistic shm mockingRyan Lortie2012-07-123-2/+82
| | | | | | | | | | | | | | | | Add an implementation of the mock shm based on a hash table. We can use this to check that all shm handles have been properly closed after each test. Soon will come support for flagging the shm regions, by name.
| * engine/: fix refcounting errorRyan Lortie2012-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | The new supposedly-threadsafe implementation of refcounting in the engine still had a bug in it: in the event that we were going to remove the last reference and we discovered that the refcount was not 1 after taking the lock, we would return (under the assumption that someone else had increased the count). This is the wrong thing to do. No matter what, we need to drop our reference -- instead of return, we should goto again.
| * dbus1/: include missing header fileRyan Lortie2012-07-111-0/+1
| | | | | | | | To prevent warning about implicit declaration.
| * Remove workaround for GCC's obnoxious behaviourRyan Lortie2012-07-111-7/+2
| | | | | | | | The workaround is in GLib now, so we don't have to do it.
| * increase GLib depend to 2.33.3Ryan Lortie2012-07-111-1/+1
| | | | | | | | | | For g_slist_copy_deep() and g_clear_pointer() with the workaround for GCC's "helpfulness".
| * tests/: test the libdbus-1 DBus backendRyan Lortie2012-07-113-1/+12
| | | | | | | | | | | | | | | | | | Add a testcase for the libdbus-1 DBus backend. It uses the existing testcase code and undergoes the same tests as the two other backends. There is one exception: we do not test for failure to connect to D-Bus because the D-Bus connections are passed up-front for the libdbus-1 case, as arguments to dconf_dbus_client_new().
| * dbus-1/: rewrite against the new engineRyan Lortie2012-07-117-1505/+434
| | | | | | | | | | | | | | | | | | | | | | Delete the copy of the old engine code that was kept in dbus-1/. Split the parts that interact with libdbus-1 into a separate file called dconf-libdbus-1.c and create a static library for it (to facilitate testing). Adjust the remaining code (which is now the user-facing DConfDBusClient API) to the new engine.
| * dbus test: signal with strings instead of intsRyan Lortie2012-07-111-2/+2
| | | | | | | | | | | | We should be testing strings and arrays of strings in our signal handling code (since that's what real dconf signals have inside of them).
| * dbus test: use GMainContext on signal receipt testRyan Lortie2012-07-111-11/+12
| | | | | | | | | | For the same reason as a few commits ago: we have to run the main context to get replies out of libdbus-1.
| * dbus test: add function to initialise for testingRyan Lortie2012-07-114-3/+20
| | | | | | | | | | | | | | We were hardcoding g_type_init() in the D-Bus testcase because the GDBus backend depended on that happening. That is not true for the libdbus-1 backend, so split it out into a separate function implemeneted by the backend.
| * dbus test: implement expected return typeRyan Lortie2012-07-111-8/+13
| | | | | | | | | | | | Implement dconf_engine_handle_get_expected_type() from the testcase by storing the expected type as the handle (instead of a pointer to nothing).
| * engine: add dconf_call_handle_get_expected_type()Ryan Lortie2012-07-112-0/+8
| | | | | | | | | | | | We were storing the expected type of the reply in the call handle already but not really doing anything with it. Provide an API to access it.
| * dbus test: use GMainContext instead of GCondRyan Lortie2012-07-111-26/+48
| | | | | | | | | | | | | | Wait for the async results to finish using a GMainContext for signalling instead of a GCond. This will let other things run in the mainloop in the meanwhile (which will be important when we add the libdbus-1 backend for testing).
| * Fix up the "changed" signal for ValaRyan Lortie2012-07-103-21/+12
| | | | | | | | | | | | | | | | | | | | Fix the vapi file to properly describe the changed signal (including the possibility of NULL tag). Change the dconf tool's implementation of the signal handler (and simplify it due to the changed semantics of the signal). Do the same for the editor.
| * Update the editor and cli to use the new sonameRyan Lortie2012-07-103-4/+4
| | | | | | | | And fit the .gitignore over the same issue, as well.