| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Test the normal case, plus the race condition case.
|
|
|
|
|
| |
Put the queue of the outstanding async calls in the header and add an
interface for defining handlers for sync calls.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=676619
|
| |
|
|
|
|
| |
This reverts commit 3bd2e9c8c37468eec6067a40ef2e66ef7372ac43.
|
| |
|
|
|
|
|
| |
Colin noticed that this was totally broken (from an ostree build). Fix
it up.
|
|
|
|
| |
We'll get an incomplete report in that case anyway...
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
bin/dconf-dump.vala
configure.ac
editor/Makefile.am
|
| |
| |
| |
| |
| | |
Use the invalidation capabilities of the mock gvdb backend to test that
the system source handles reopening properly.
|
| |
| |
| |
| | |
Support a table being marked as no-longer-valid.
|
| |
| |
| |
| |
| | |
Resetting keys should absolutely always succeed, so don't check for key
writability in that case.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Always do init as part of the process of dconf_engine_source_new() to
avoid the consumer from having to call it for themselves.
|
| |
| |
| |
| |
| | |
Don't open the database file on _init(). This makes us match the system
source better.
|
| |
| |
| |
| |
| | |
Stop returning a boolean here (since all of the sources always returned
TRUE all the time anyway).
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
To prevent warning about implicit declaration.
|
| |
| |
| |
| | |
The workaround is in GLib now, so we don't have to do it.
|
| |
| |
| |
| |
| | |
For g_slist_copy_deep() and g_clear_pointer() with the workaround for
GCC's "helpfulness".
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| | |
For the same reason as a few commits ago: we have to run the main
context to get replies out of libdbus-1.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
Implement dconf_engine_handle_get_expected_type() from the testcase by
storing the expected type as the handle (instead of a pointer to
nothing).
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
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 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.
|
| |
| |
| |
| | |
And fit the .gitignore over the same issue, as well.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Since there have been incompatible API changes...
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
This is no longer needed with "fast" writes supported in the engine.
|