summaryrefslogtreecommitdiff
path: root/src/test/test-unit-file.c
Commit message (Collapse)AuthorAge
* core/load-fragment: avoid allocating 0 bytes when given an invalid commandZbigniew Jędrzejewski-Szmek2015-01-11
| | | | | With a command line like "@/something" we would allocate an array with 0 elements. Avoid that, and add a test too.
* test-unit-file: don't access out-of-bounds memoryZbigniew Jędrzejewski-Szmek2015-01-11
| | | | Fixes an error introduced by me when the test was added.
* load-fragment: allow quoting in command name and document allowed escapesZbigniew Jędrzejewski-Szmek2014-12-18
| | | | | | | | | The handling of the command name and other arguments is unified. This simplifies things and should make them more predictable for users. Incidentally, this makes ExecStart handling match the .desktop file specification, apart for the requirment for an absolute path. https://bugs.freedesktop.org/show_bug.cgi?id=86171
* test-unit-file: add test for semicolon escapingZbigniew Jędrzejewski-Szmek2014-12-18
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=87393
* test: support empty environment variables in unit filesIago López Galeiras2014-11-23
| | | | | Also update TODO, empty environment variables in Environment= and EnvironmentFile= options work.
* test: only use assert_seThomas Hindoe Paaboel Andersen2014-10-04
| | | | | The asserts used in the tests should never be allowed to be optimized away
* hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt2014-09-15
| | | | | | | | | 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.
* machinectl: show /etc/os-release information of container in status outputLennart Poettering2014-07-03
|
* test-unit-file: skip if unit_file_get_list returns permission deniedCristian Rodríguez2014-05-25
|
* macro: add nice macro for disabling -Wnonnull temporarilyLennart Poettering2014-02-20
|
* always use the same code for creating temporary filesLennart Poettering2014-01-28
| | | | Let's unify our code here, and also always specifiy O_CLOEXEC.
* conf-parser: distinguish between multiple sections with the same nameTom Gundersen2013-11-25
| | | | | | | | | | | | | | | | | | | | | | | Pass on the line on which a section was decleared to the parsers, so they can distinguish between multiple sections (if they chose to). Currently no parsers take advantage of this, but a follow-up patch will do that to distinguish [Address] Address=192.168.0.1/24 Label=one [Address] Address=192.168.0.2/24 Label=two from [Address] Address=192.168.0.1/24 Label=one Address=192.168.0.2/24 Label=two
* specifier: rework specifier calls to return proper error messageLennart Poettering2013-09-17
| | | | | | Previously the specifier calls could only indicate OOM by returning NULL. With this change they will return negative errno-style error codes like everything else.
* 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.
* test-unit-file: return error without dumping core on permission errorChristian Hesse2013-07-30
|
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Report about syntax errors with metadataZbigniew Jędrzejewski-Szmek2013-04-17
| | | | | | | | | | | | | The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
* core: log a few more things under UNIT=...Zbigniew Jędrzejewski-Szmek2013-04-17
|
* fileio: in envfiles, do not skip lines following empty linesZbigniew Jędrzejewski-Szmek2013-04-13
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=63477
* shared: rework env file readerLennart Poettering2013-04-03
| | | | | | Implement this with a proper state machine, so that newlines and escaped chars can appear in string assignments. This should bring the parser much closer to shell.
* Fix typos of /etc/systemd/systemdZbigniew Jędrzejewski-Szmek2013-03-09
| | | | | | | <Lekensteyn> The 198 announcement mentions "/etc/systemd/systemd/foobar.service.d/*.conf", is that a typo? I only have a /etc/systemd/system/. Is there a manpage describing this new feature?
* honor SELinux labels, when creating and writing config filesHarald Hoyer2013-02-14
| | | | | | | Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
* tests: add test for continuation lines with commentsZbigniew Jędrzejewski-Szmek2013-02-13
|
* tests: add test for install_full_printf()Zbigniew Jędrzejewski-Szmek2013-01-29
|
* util: modernization and test for load_env_fileZbigniew Jędrzejewski-Szmek2013-01-18
|
* core: lift restriction on order of - and @ in ExecStartZbigniew Jędrzejewski-Szmek2012-11-15
|
* core: interpret \; token in ExecStart as escaped ;Oleksii Shevchuk2012-11-15
| | | | | | | Some commands (like 'find') take a semicolon as separate arg. With current parser implementation there is no way to pass one. Patch adds token \;
* tests: add tests for config_parse_execZbigniew Jędrzejewski-Szmek2012-11-15
|
* install: treat non-existent directory as emptyZbigniew Jędrzejewski-Szmek2012-09-16
| | | | | | | When looking for symlinks, it doesn't make sense to error-out if the directory is missing. The user might delete an empty directory. This check caused test-unit-file to fail when run before installation.
* when determining unit file list, include invalid unit names in an "invalid" ↵Lennart Poettering2012-09-11
state