summaryrefslogtreecommitdiff
path: root/src/journal/test-catalog.c
AgeCommit message (Collapse)AuthorFilesLines
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen1-1/+0
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-11-30tests: use assert_se instead of assertRonny Chevalier1-8/+8
Otherwise they can be optimized away with -DNDEBUG
2014-09-15hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt1-1/+1
It is redundant to store 'hash' and 'compare' function pointers in struct Hashmap separately. The functions always comprise a pair. Store a single pointer to struct hash_ops instead. systemd keeps hundreds of hashmaps, so this saves a little bit of memory.
2014-04-12journal: cleanup up error handling in update_catalog()Zbigniew Jędrzejewski-Szmek1-1/+2
- Negative/positive errno mixup caused duplicates not to be detected properly. Now we get a warning about some duplicate entries in our own catalogs... - Errors in update_catalog would be ignored, but they should not be. Notes: Backport: bugfix
2014-01-28always use the same code for creating temporary filesLennart Poettering1-3/+6
Let's unify our code here, and also always specifiy O_CLOEXEC.
2013-12-15catalog: fix language detectionZbigniew Jędrzejewski-Szmek1-3/+9
Detection would fail if language was not specified in the filename but a dot appeared somewhere higher in the path.
2013-12-02catalog: determine language from the filenameZbigniew Jędrzejewski-Szmek1-0/+24
2013-08-22test: Make testing work on systems without or old systemdHolger Hans Peter Freyther1-3/+17
* 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-04-18move _cleanup_ attribute in front of the typeHarald Hoyer1-1/+1
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
2013-04-05test-catalog,core/load-dropin: remove unused variablesZbigniew Jędrzejewski-Szmek1-1/+0
2013-03-28catalog: open up catalog internalsZbigniew Jędrzejewski-Szmek1-7/+92
In order to write tests for the catalog functions, they are made non-static and start taking a 'database' parameter, which is the name of a file with the preprocessed catalog entries. This makes it possible to make test-catalog part of the normal test suite, since it now only operates on files in /tmp. Some more tests are added.
2013-03-19journalct: beef up entry listingZbigniew Jędrzejewski-Szmek1-1/+3
The ability to dump catalog entries in full and by id is added.
2012-11-15journal: implement message catalogLennart Poettering1-0/+48
The message catalog can be used to attach short help texts to log lines, keyed by their MESSAGE_ID= fields. This is useful to help the administrator understand the context and cause of a message, find possible solutions and find further related documentation. Since this is keyed off MESSAGE_ID= this will only work for native journal messages. The message catalog supports i18n, and is useful to augment english language system messages with explanations in the local language. This commit only includes short explanatory messages for a few example message IDs, we'll add more complete documentation for the relevant systemd messages later on.