| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
/gvdb/reader/corrupted/7% was failing when run with random seed
R02S2a7b9704dbb5ea704b0d724329af0fbf.
This is a fuzz test, and it turns out that this particular seed ended up
producing a file that was valid, but contained a self-referential table.
The testcase happily recursed though this table's subtable (itself) and
so on, until it ran out of stack space, causing a crash.
This bug would not impact realworld users of gvdb: these users only ever
recurse through tables a finite number of times. For dconf, subtables
are not used at all. For GSettings, each schema is a subtable, but from
within that subtable we only lookup values.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We use -ldl in some of our testcases to mock out some system calls via
interposing, using dlsym() to chain up.
Make sure we only use this if we really need to. Many systems have
dlsym() in the C library and no -ldl.
https://bugzilla.gnome.org/show_bug.cgi?id=720072
|
| |
|
|
|
|
|
|
|
|
| |
Add a testcase to exercise the engine's processing of signals, including
its ability to reject bad data.
This testcase already found several issues with the engine which have
already been fixed in previous commits.
|
|
|
|
|
| |
Wire through WritabilityNotify signals from the engine. This has been
unimplemented for a very long time...
|
|
|
|
|
|
| |
Stop setting the DCONF_PROFILE environment variable while threads are
running. Leave only one case where we set it explicitly to check that
the variable itself is working correctly.
|
|
|
|
|
|
|
| |
Allow specifying a profile when calling dconf_engine_new(). This will
allow us to avoid setting/unsetting the DCONF_PROFILE environment in
testcases from contexts where other threads may be reading from the
environment.
|
|
|
|
| |
And fix some leaks in an existing test.
|
|
|
|
|
|
|
| |
Always call dconf_engine_call_handle_get_expected_type() from the mock
dbus backend, even if the handle is NULL. This matches the behaviour of
the real D-Bus backends and would have caught the bug fixed in the last
commit.
|
| |
|
|
|
|
|
|
|
|
| |
N_MAX_SOURCES is 3 but we only check up to < N_MAX_SOURCES, so we only
ever checked 2.
The tests work with 3, but it takes very very long to run them, so fix
the comparison but at the same time, decrease the count.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On failure to open a gvdb file in /etc/dconf/db we would issue a warning
once per process -- even if multiple files were missing.
This was enforced using a static variable.
An unfortunate side effect of this global state is that the testcases
couldn't reliably know if to expect the error or not. This issue was
side-stepped by running any cases that may emit the warning under a
fork, but that made it difficult to debug some of the cases.
Rework the backends not to use global state for the flag and instead
store it per-source.
Remove a use of g_test_trap_fork().
|
|
|
|
|
| |
Make sure the read_through parameter to _read() and _read_user_value()
is behaving as we expect it to.
|
|
|
|
|
|
|
| |
Add API for replying to async calls in the mock dbus backend and for
checking that there are no calls outstanding.
Use it from the engine test.
|
| |
|
|
|
|
| |
Make sure it's returning the value only in the cases we expect.
|
|
|
|
|
|
|
|
| |
The testsuite is happily using g_test_trap_fork() and dconf only builds
on POSIX anyway, so this isn't a problem.
Add version macros to the top of the testcases that use this API to
suppress the deprecation warnings.
|
|
|
|
| |
Add a test to cover the service source backend in the engine.
|
|
|
|
|
| |
Instead of checking the D-Bus interface name we were checking the
bus name twice.
|
|
|
|
|
| |
But make sure an error is set if NULL is returned and the caller passed
in an error pointer.
|
|
|
|
| |
Add a weird test to hit two additional obscure cases
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gtestutils recently changed the order in which testcases are run, by
grouping cases with similar paths together.
Our D-Bus test depends on one of its cases running before the others.
Change the way the tests are grouped in order to ensure that this keeps
happening.
|
|
|
|
| |
Since we now have a hard dependency on the newer GLib anyway.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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).
|