summaryrefslogtreecommitdiff
path: root/src/journal/test-journal.c
AgeCommit message (Collapse)Author
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2014-12-18journal: journal_file_next_entry() does not need pointer to current ObjectMichal Schmidt
The current offset is sufficient information.
2014-12-18journal: delete unused function journal_file_skip_entry()Michal Schmidt
Its only caller is a test.
2014-11-30tests: use assert_se instead of assertRonny Chevalier
Otherwise they can be optimized away with -DNDEBUG
2014-11-03journalctl: add new --vacuum-size= and --vacuum-time= commands to clean up ↵Lennart Poettering
journal files based on a size/time limit This is equivalent to the effect of SystemMaxUse= and RetentionSec=, however can be invoked directly instead of implicitly.
2014-07-31Always prefer our headers to system headersZbigniew Jędrzejewski-Szmek
In practice this shouldn't make much difference, but sometimes our headers might be newer, and we want to test them.
2014-01-11journald: do not free space when disk space runs lowZbigniew Jędrzejewski-Szmek
Before, journald would remove journal files until both MaxUse= and KeepFree= settings would be satisfied. The first one depends (if set automatically) on the size of the file system and is constant. But the second one depends on current use of the file system, and a spike in disk usage would cause journald to delete journal files, trying to reach usage which would leave 15% of the disk free. This behaviour is surprising for the user who doesn't expect his logs to be purged when disk usage goes above 85%, which on a large disk could be some gigabytes from being full. In addition attempting to keep 15% free provides an attack vector where filling the disk sufficiently disposes of almost all logs. Instead, obey KeepFree= only as a limit on adding additional files. When replacing old files with new, ignore KeepFree=. This means that if journal disk usage reached some high point that at some later point start to violate the KeepFree= constraint, journald will not add files to go above this point, but it will stay (slightly) below it. When journald is restarted, it forgets the previous maximum usage value, and sets the limit based on the current usage, so if disk remains to be filled, journald might use one journal-file-size less on each restart, if restarts happen just after rotation. This seems like a reasonable compromise between implementation complexity and robustness.
2013-10-09tests: fix some memory leaks in testsLennart Poettering
2013-08-22test: Make testing work on systems without or old systemdHolger Hans Peter Freyther
* Introduce a macro to conditionally execute tests. This avoids skipping the entire test if some parts require systemd * Skip the journal tests when no /etc/machine-id is present * Change test-catalog to load the catalog from the source directory of systemd. * /proc/PID/comm got introduced in v2.6.33 but travis is still using v2.6.32. * Enable make check and make distcheck on the travis build * Use -D"CATALOG_DIR=STR($(abs_top_srcdir)/catalog)" as a STRINGIY would result in the path '/home/ich/source/linux' to be expanded to '/home/ich/source/1' as linux is defined to 1.
2013-06-10tests: add test for empty journal filesZbigniew Jędrzejewski-Szmek
The headers are currently not printed properly: some "(null)"s appear.
2012-10-18journal: add ability to list values a specified field can take in all ↵Lennart Poettering
entries of the journal The new 'unique' API allows listing all unique field values that a field specified by a field name can take in all entries of the journal. This allows answering queries such as "What units logged to the journal?", "What hosts have logged into the journal?", "Which boot IDs have logged into the journal?". Ultimately this allows implementation of tools similar to lastlog based on journal data. Note that listing these field values will not work for journal files created with older journald, as the field values are not indexed in older files.
2012-10-16journal: implement time-based rotation/vacuumingLennart Poettering
This also enables time-based rotation (but not vacuuming) after 1month, so that not more one month of journal is lost at a time per vacuuming.
2012-08-20journal: make libgcrypt dependency optionalLennart Poettering
2012-08-16journal: split up journal-file.cLennart Poettering
2012-08-16journal: implement generic sharable mmap caching logicLennart Poettering
instead of having one simple per-file cache implement an more comprehensive one that works for multiple files and can actually maintain multiple maps per file and per object type.
2012-08-13journal: add all objects we add to HMACLennart Poettering
2012-08-13journald: initial version of FSPRG hookupLennart Poettering
This adds forward-secure authentication of journal files. This patch includes key generation as well as tagging of journal files, Verification of journal files will be added in a later patch.
2012-08-03test: allow deletion of temporary files from normal fsZbigniew Jędrzejewski-Szmek
Not everybody has /tmp on tmpfs, and this was breaking 'make check'.
2012-07-17journal: size journal data hash table based on maximum file size metricsLennart Poettering
The default of 2047 hash table entries turned out to result in way too many collisions for bigger files, hence scale the hash table size by the estimated maximum file size.
2012-07-13test: hook up more tests with make checkLennart Poettering
2012-04-12relicense to LGPLv2.1 (with exceptions)Lennart Poettering
We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
2012-01-05build-sys: move public header files into a dir of their ownLennart Poettering
2011-12-22journald: enforce some syntax restrictions on field names sent from the ↵Lennart Poettering
client side
2011-12-17journal: add native protocol to journald, and client side API to send ↵Lennart Poettering
journal messages
2011-11-08journal: implement multiple field matchesLennart Poettering
2011-10-15journal: unify code for up and for down traversalLennart Poettering
2011-10-14journal: synchronize seqnum across filesLennart Poettering
2011-10-13journal: implementation rotationLennart Poettering
2011-10-08journal: implement parallel traversal in clientLennart Poettering
2011-10-07journal: replace linked list by hashmap when merging filesLennart Poettering
2011-10-07journal: add preliminary incomplete implementationLennart Poettering