| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Make sure we allocate enough room for the NULL at the end of the
gchar**.
|
|
|
|
|
| |
These old programs aren't part of the test suite and they're not very
useful now that we have proper testcases.
|
|
|
|
| |
Add a test case that would have caught this problem.
|
| |
|
| |
|
|
|
|
| |
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.
|