| 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).
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=676619
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
We're now back at 100% docs coverage with no warnings.
|
|
|
|
| |
Drop the tests for gvdb_table_walk() which will soon be removed.
|
| |
|
|
|
|
|
|
|
| |
Disable C compiler warnings entirely while building Vala code.
Fix-up a couple of legitimate issues plus one false-positive
(in service.c).
|
|
|
|
|
|
|
|
|
|
| |
Clean up the Makefiles and make them as similar as possible.
Move CFLAGS to a common point of definition and stop using -I so much.
Replace the 'dbus stub' with libdconf-mock.a in tests/. Fill in some
stubs for future mock code for shm and gvdb (just to get things
compiling for now).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the shm code from the engine and the service and put it in a
separate convenience library in shm/.
Remove the vestigial shmdir weirdness from the service (since shmdir is
now always relative to XDG_RUNTIME_DIR and has been for some time).
The purpose of this is so that dconf-engine can be properly unit-tested.
dconf-engine now has five points of contact with the world (excluding
the users of the engine themselves):
- the DCONF_PROFILE environment variable
- fopen() of profile files
- shm
- gvdb
- dbus
The environment variable is quite easily controlled. fopen() is
intercepted in the engine testcase with a interpose of the libc symbol.
With this commit now each of dbus, gvdb and shm are implemented in
separate utility modules that can be mocked from the testcases.
|
|
|
|
| |
Add it to EXTRA_DIST in the Makefile.am as well.
|
|
|
|
|
|
|
| |
We were using a negative variable for the value of a counter designed to
bound the number of open() calls in a walk. We were decrementing it in
that case (which is fine since it would never reach zero again anyway).
It was a bit ugly, though.
|
| |
|
|
|
|
|
| |
Test the robustness of the gvdb-reader when faced with a corrupted GVDB
file.
|
|
|
|
|
|
|
|
| |
Using g_string_append_c() causes GLib headers to appear in the test
coverage results (since it's an inline function). Avoid that.
It's probably possible to do this in a more clever way but this works
for now.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
So far just a simple test to make sure the threadsafety logic in
dconf_engine_unref() is working properly.
|
|
|
|
|
| |
Also add some macros in the Makefile to make LDFLAGS lines for future
tests easier.
|
|
|
|
|
|
|
| |
Currently we test the gdbus-thread and gdbus-filter backends.
It should be possible to use the same code (with minor changes) once the
dbus-1 backend is ported to the new world order.
|
| |
|
|
|
|
|
|
| |
So far only the reader is tested.
We also include some example gvdb databases for use by the testcase.
|
|
|
|
| |
This gives more information when it fails...
|
| |
|
|
|
|
|
|
|
| |
One -fPIC and one without.
This is done instead of pulling the various source files from other
Makefiles.
|
|
|
|
|
| |
Some linkers care about the order of -l options appearing on the
commandline.
|
|
|
|
| |
...since we don't link to it.
|
|\ |
|