summaryrefslogtreecommitdiff
path: root/src/journal/test-journal.c
Commit message (Collapse)AuthorAge
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | 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.
* journal: journal_file_next_entry() does not need pointer to current ObjectMichal Schmidt2014-12-18
| | | | The current offset is sufficient information.
* journal: delete unused function journal_file_skip_entry()Michal Schmidt2014-12-18
| | | | Its only caller is a test.
* tests: use assert_se instead of assertRonny Chevalier2014-11-30
| | | | Otherwise they can be optimized away with -DNDEBUG
* journalctl: add new --vacuum-size= and --vacuum-time= commands to clean up ↵Lennart Poettering2014-11-03
| | | | | | | 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.
* Always prefer our headers to system headersZbigniew Jędrzejewski-Szmek2014-07-31
| | | | | | In practice this shouldn't make much difference, but sometimes our headers might be newer, and we want to test them.
* journald: do not free space when disk space runs lowZbigniew Jędrzejewski-Szmek2014-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* tests: fix some memory leaks in testsLennart Poettering2013-10-09
|
* test: Make testing work on systems without or old systemdHolger Hans Peter Freyther2013-08-22
| | | | | | | | | | | | | | * 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.
* tests: add test for empty journal filesZbigniew Jędrzejewski-Szmek2013-06-10
| | | | The headers are currently not printed properly: some "(null)"s appear.
* journal: add ability to list values a specified field can take in all ↵Lennart Poettering2012-10-18
| | | | | | | | | | | | | | | | | 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.
* journal: implement time-based rotation/vacuumingLennart Poettering2012-10-16
| | | | | 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.
* journal: make libgcrypt dependency optionalLennart Poettering2012-08-20
|
* journal: split up journal-file.cLennart Poettering2012-08-16
|
* journal: implement generic sharable mmap caching logicLennart Poettering2012-08-16
| | | | | | 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.
* journal: add all objects we add to HMACLennart Poettering2012-08-13
|
* journald: initial version of FSPRG hookupLennart Poettering2012-08-13
| | | | | | 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.
* test: allow deletion of temporary files from normal fsZbigniew Jędrzejewski-Szmek2012-08-03
| | | | Not everybody has /tmp on tmpfs, and this was breaking 'make check'.
* journal: size journal data hash table based on maximum file size metricsLennart Poettering2012-07-17
| | | | | | 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.
* test: hook up more tests with make checkLennart Poettering2012-07-13
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | 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.
* build-sys: move public header files into a dir of their ownLennart Poettering2012-01-05
|
* journald: enforce some syntax restrictions on field names sent from the ↵Lennart Poettering2011-12-22
| | | | client side
* journal: add native protocol to journald, and client side API to send ↵Lennart Poettering2011-12-17
| | | | journal messages
* journal: implement multiple field matchesLennart Poettering2011-11-08
|
* journal: unify code for up and for down traversalLennart Poettering2011-10-15
|
* journal: synchronize seqnum across filesLennart Poettering2011-10-14
|
* journal: implementation rotationLennart Poettering2011-10-13
|
* journal: implement parallel traversal in clientLennart Poettering2011-10-08
|
* journal: replace linked list by hashmap when merging filesLennart Poettering2011-10-07
|
* journal: add preliminary incomplete implementationLennart Poettering2011-10-07