summaryrefslogtreecommitdiff
path: root/tests/gvdb.c
Commit message (Collapse)AuthorAgeFilesLines
* gvdb test: avoid infinite recursionRyan Lortie2014-02-211-4/+8
| | | | | | | | | | | | | | | | /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.
* adjust to new gvdb APIsRyan Lortie2012-11-091-15/+17
|
* tests/gvdb: test gvdb_table_get_names()Ryan Lortie2012-07-091-119/+53
| | | | Drop the tests for gvdb_table_walk() which will soon be removed.
* tests/: fix some leaks in testcasesRyan Lortie2012-07-091-0/+3
|
* massive Makefile reorganisationRyan Lortie2012-07-081-1/+1
| | | | | | | | | | 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).
* gvdb test: fix logic for infinite walksRyan Lortie2012-07-081-1/+2
| | | | | | | 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.
* gvdb test: test reader against corruptionRyan Lortie2012-07-061-0/+182
| | | | | Test the robustness of the gvdb-reader when faced with a corrupted GVDB file.
* gvdb test: Use g_string_append()Ryan Lortie2012-07-061-2/+2
| | | | | | | | 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.
* tests/: add gvdb testcaseRyan Lortie2012-07-061-0/+312
So far only the reader is tested. We also include some example gvdb databases for use by the testcase.