summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * Reimplement sync() functionalityRyan Lortie2012-07-106-4/+72
| | | | | | | | | | | | | | | | | | Add dconf_engine_sync() that does the same thing as the code in the GSettings backend used to do, in a cleaner way. Update the GSettings backend to use the new call. Add a new call to DConfClient wrapping the engine call as well.
| * client/: bump the soname of libdconf to 1Ryan Lortie2012-07-101-12/+12
| | | | | | | | Since there have been incompatible API changes...
| * Makefile.am: add lcov-trim.py to EXTRA_DISTRyan Lortie2012-07-101-0/+1
| |
| * Add script to trim bogus lcov dataRyan Lortie2012-07-103-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | There is no (apparent) way to trim branch or line coverage data from lcov output based on expression matching against the source file. This means that we get coverage results that tell us (for example) that we failed to test lines like 'g_assert_not_reached ();' or didn't test all branches of a g_assert(). Add a script to read the lcov output and remove line or branch coverage data according to a list of symbols that are known to have incomplete coverage when operating as expected.
| * DConfChangeset: pointless fiddling with assertsRyan Lortie2012-07-101-2/+3
| | | | | | | | | | | | Adjust the way that an assert is done in order to convince lcov that we have 100% line coverage (since the 'g_assert_not_reached()' wasn't being hit before).
| * engine: fix dconf_engine_unref() thread safetyRyan Lortie2012-07-101-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a very slim race condition in the implementation of dconf_engine_unref(). In order to check if the engine should be freed (to avoid double-freeing in two separate threads) the code was checking if the engine was still in the global list of engines. It is possible, however, that this thread could have unrefed the engine at exactly the same time as another thread, that thread won the race and freed the engine (removing it from the list) and then a third thread created another engine at the same time and it happened to have the same pointer address as the engine that was just freed. In this case, the first engine would still see "itself" in the global list and free again. It's unlikely that this would ever happen in the real world but the regression tests picked it up. The new implementation should avoid that issue by not depending on the engine finding itself in the list as part of the decision about if it should be freed or not.
| * docs/: two build fixesRyan Lortie2012-07-101-1/+3
| | | | | | | | | | Fix docs build for out-of-tree (builddir != srcdir). Also add the *.c and *.h globs so that the docs get rebuilt if the files change.
| * gsettings/: remove the dconfcontext codeRyan Lortie2012-07-104-46/+0
| | | | | | | | This is no longer needed with "fast" writes supported in the engine.