summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Service: avoid redundant writes even after other non redundant writes have ↵Daniel Playfair Cal2019-12-292-2/+67
| | | | succeeded
* Service: add tests exercising new functionality to avoid redundant writesDaniel Playfair Cal2019-12-291-0/+139
|
* Changeset: factor out some memory management from test_filter_changesDaniel Playfair Cal2019-12-291-56/+27
|
* Changeset: make dconf_changeset_filter_changes filter out key/path resets ↵Daniel Playfair Cal2019-12-291-13/+56
| | | | when appropriate
* Service: Add unit tests for dconf_changeset_filter_changesDaniel Playfair Cal2019-12-291-0/+126
|
* tests: Add new test to check GDBusConnection leaksAndre Moreira Magalhaes2019-07-242-0/+47
| | | | | | | | | | | | | With recent changes made to GLib[1] invoking g_test_dbus_down() will fail after a timeout if the GDBusConnection object for the session bus leaks. Note that this new test will fail as the current code will leak a cached GDBusConnection. Fixes will be added in follow-up patches. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/963 Signed-off-by: Andre Moreira Magalhaes <andre@endlessm.com>
* build: Define GVDB_USE_WEAK_SYMBOLS to use weak bindings in gvdbTing-Wei Lan2019-07-062-7/+7
| | | | | | | Fix linking with LLD by using weak symbols in gvdb, and update dconf code to make it compatible with gvdb upstream changes. Fixes https://gitlab.gnome.org/GNOME/dconf/issues/47
* tests: Avoid using real system bus during testsTomasz Miąsko2019-02-251-2/+2
| | | | | | | | | | | When a bus address is unset the default value will be used. While the session bus address is overwritten during tests, this not the case for system bus. Use empty invalid addresses as a safer default to avoid accidental connections to the external buses. Issue #51.
* Merge branch 'fix-shm-test-modules' into 'master'Daniel Playfair Cal2019-02-123-15/+8
|\ | | | | | | | | Tests: remove bug prone usage of dlsym and RTDL_NEXT See merge request GNOME/dconf!37
| * Tests: replace usage of dlsym with separate modules containing functions ↵Daniel Playfair Cal2019-02-123-21/+8
| | | | | | | | that need to be mocked out
| * tests: shm: fix pwrite wrapper with -D_FILE_OFFSET_BITS=64Ben Wolsieffer2019-02-121-1/+7
| | | | | | | | | | | | | | | | Due to the hacks used for large file support, wrapping pwrite is error prone and can end up calling the wrong function. Currently, "pwrite" is called instead of "pwrite64" on 32-bit ARM, causing the test to fail. This commit attempts to determine the correct symbol to call from the wrapper.
* | bin: Add an option to ignore changes to locked keys during loadTomasz Miąsko2019-02-121-2/+23
| | | | | | | | | | | | | | | | | | If load command attempts to change one of non-writable keys, the whole operation fails with an error and no changes are made. Add an `-f` option to the load command that skips non-writable keys and proceeds with remaining changes. Closes issue #1.
* | tests: Use more concise key and valueTomasz Miąsko2019-02-121-5/+4
|/
* tests: Add a simple test case for help and update.Tomasz Miąsko2019-01-291-0/+12
|
* tests: Add integration test for dconf blameTomasz Miąsko2019-01-071-0/+17
|
* tests: Sanitize additional environment variables used by dconfTomasz Miąsko2018-12-101-1/+5
|
* tests: Key paths can be locked in system databasesTomasz Miąsko2018-12-101-0/+83
|
* bin: Indicate update failure with non-zero exit codeTomasz Miąsko2018-12-061-1/+0
| | | | Fixes issue #42.
* Merge branch 'integration-test-2' into 'master'Daniel Playfair Cal2018-11-191-3/+213
|\ | | | | | | | | Add further integration tests See merge request GNOME/dconf!33
| * tests: Update should indicate failure with non-zero exit codeTomasz Miąsko2018-11-171-0/+62
| |
| * tests: Update invalidates replaced databaseTomasz Miąsko2018-11-151-0/+31
| |
| * tests: dconf ignores files starting with a dotTomasz Miąsko2018-11-151-3/+29
| |
| * bin: Consistently validate the number of argumentsTomasz Miąsko2018-11-151-0/+91
| |
* | engine: Limit the number of in-flight requests to oneTomasz Miąsko2018-11-161-22/+13
| | | | | | | | | | | | Reduce the number of in-flight requests to one, so as to increase chances of merging pending requests. Drop the in-flight queue since it is no longer useful, replacing it with optional changeset.
* | engine: Coalesce pending writes into a single changesetTomasz Miąsko2018-11-161-0/+83
|/ | | | | | | | | | Instead of queuing changes and sending them to a writer one by one, coalesce them into a single changeset. Coalescing changes requires a little bit more work on the client side, see implementation of `dconf_changeset_change`, but it has chance to substantially reduce the total amount of work necessary and avoid costly disk writes.
* tests: Add test that redundant disk writes are avoidedTomasz Miąsko2018-11-131-0/+42
|
* tests: Add test for compile command processing orderTomasz Miąsko2018-11-131-0/+39
|
* tests: Add bash path completion testsTomasz Miąsko2018-11-131-0/+64
|
* bin: Sort output of list and dump commandsTomasz Miąsko2018-11-131-12/+5
|
* tests: Add tests for dconf utility toolTomasz Miąsko2018-11-132-0/+348
|
* Revert "Revert "Declare libdconf_service as a dependency""Daniel Playfair Cal2018-08-271-1/+1
| | | | This reverts commit b799b08ec4e5978ab8db233a9da1532bf7918324.
* Revert "Declare libdconf_service as a dependency"Daniel Playfair Cal2018-08-271-1/+1
| | | | This reverts commit bf103302332603a637f1c33e603c93b82aa1dc0b.
* Declare libdconf_service as a dependencyEmmanuele Bassi2018-08-211-1/+1
| | | | | | | | | | | | | | | | The dconf-service internal static library depends on generated files, and we need to make sure that those files are available by the time we build the tests that depend on them, as Meson builds everything in parallel. If we don't do that, in cases of massive parallelised builders, we will end up with errors like: ``` ccache cc -Itests/tests@@writer@exe -Itests -I../tests -I. -I../ -Itests/../service -I../tests/../service -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g '-DSYSCONFDIR="/etc"' -fno-common -Wmissing-prototypes -Wwrite-strings -O2 -g -m64 -mtune=generic '-DSRCDIR="/ostbuild/source/dconf/tests"' -MD -MQ 'tests/tests@@writer@exe/writer.c.o' -MF 'tests/tests@@writer@exe/writer.c.o.d' -o 'tests/tests@@writer@exe/writer.c.o' -c ../tests/writer.c ../tests/writer.c:24:37: fatal error: service/dconf-generated.h: No such file or directory ``` Reviewed-by: nobody Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* tests: Port log message handling in tests to use structured loggingPhilip Withnall2018-08-162-60/+162
| | | | | | | Otherwise the tests fail now that we’re compiling with G_LOG_USE_STRUCTURED. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tests: Stop using deprecated g_test_trap_fork() APIPhilip Withnall2018-08-163-53/+89
| | | | | | | | | | | | | | Use g_test_subprocess() and g_test_trap_subprocess() instead. This requires splitting up some of the unit tests, since subprocesses are handled at a per-test level, and you can’t trivially fork multiple different subprocesses from a single test (like you could with fork()). While fork was safe to use on POSIX (and dconf only targets POSIX), the fact that we had to redefine GLIB_VERSION_MIN_REQUIRED to hide the deprecation errors was not doing wonders for the maintainability of the tests. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tests: Add unit tests for some of service/dconf-writer.cPhilip Withnall2018-08-162-0/+235
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Replace all hard-coded /etc path with sysconfdirwip/lantw/dont-hard-code-etcTing-Wei Lan2018-08-161-18/+18
| | | | | | | This is useful for JHBuild environments and systems that don't want to use /etc/dconf. https://bugzilla.gnome.org/show_bug.cgi?id=739299
* Engine: Add comprehensive unit tests for subscription counting behaviourDaniel Playfair Cal2018-08-141-0/+206
| | | | Use g_assert_false instead of g_assert in unit tests
* Engine: extend subscriptions state to account for multiple client ↵Daniel Playfair Cal2018-08-141-50/+4
| | | | | | | | | | | | | | subscriptions to the same path Remove accidental whitespace change Simplify branching in watch_fast and unwatch_fast Indentation fixes Store the subscription counts directly in the hash table pointer instead of mallocing ints Add documentation comments for new utility functions
* build: Add trailing commas where necessaryIñigo Martínez2018-08-111-4/+4
| | | | | | Having trailing commas in place means that if another source file or parameter is added to the end of the list or function, there won't be noise when adding the comma to the line above.
* build: Do not make heavy use of project_nameIñigo Martínez2018-08-111-1/+1
| | | | | | | | | The current meson build files make heavy use of meson's `project_name` function. However this makes difficult for any developer to find for given program/library/file names. The project name is also never going to change. Due to this reason these calls have been changed for `dconf` itself.
* build: Fix internal dependenciesIñigo Martínez2018-08-111-8/+8
| | | | | | | | | meson is able to generate internal dependencies for handling built libraries. These internal dependencies depend on other dependencies as well, based on the includes exposed by their headers. This have been fixed by using proper internal dependencies for these libraries.
* tests: Don’t run D-Bus tests on CI as they fail unexpectedlyPhilip Withnall2018-08-101-0/+42
| | | | | | | | | | | | I can’t work out why they’re failing, so disable them for the moment. The immediate error they give is about not being able to start a bus when $DISPLAY isn’t defined — but if you switch them to run under GTestDBus, they fail more cryptically with a failure to find a bus socket. This can be reapproached later. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tests: Set G_DEBUG and other useful environment variablesPhilip Withnall2018-08-101-1/+6
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* tests: Fix a deprecation warning about source definitionsPhilip Withnall2018-08-101-1/+1
| | | | | | | /usr/include/features.h:183:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Engine: track in progress watch handles to avoid spurious changed signals ↵Daniel Playfair Cal2018-07-131-2/+64
| | | | for the root path
* Revert "Disable another failing test"Michael Catanzaro2018-03-131-2/+1
| | | | This reverts commit a9cc9f30b8cc340428cb781797dacd60b39f1de6.
* Disable another failing testMichael Catanzaro2018-03-131-1/+2
| | | | Interestingly, it's a different failing test than last time. Yippee!
* Remove .gitignore filesIñigo Martínez2017-10-221-11/+0
| | | | | | | | | | meson does not allow to build source code inside the source code tree, for this reason there is no need for .gitignore files to ignore built files. This patch removes .gitignore files which are no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* Revert "Disable broken test"Michael Catanzaro2017-10-171-2/+1
| | | | | | | This reverts commit ab2692a967c6a19e532014391d402fa428131ccc. I figure whoever cares for dconf in the future will probably want to know that this test is broken.