1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-12 15:21:19 +03:00
systemd/src/test
Zbigniew Jędrzejewski-Szmek d15d0333be Add new function to filter fstab options
This fixes parsing of options in shared/generator.c. Existing code
had some issues:

- it would treate whitespace and semicolons as seperators. fstab(5)
  is pretty clear that only commas matter. And the syntax does
  not allow for spaces to be inserted in the field in fstab.
  Whitespace might be escaped, but then it should not seperate
  options. Treat whitespace and semicolons as any other character.
- it assumed that x-systemd.device-timeout would always be followed
  by "=". But this is not guaranteed, hasmntopt will return this
  option even if there's no value. Uninitialized memory could be read.
- some error paths would log, and inconsistently, some would just
  return an error code.

Filtering is split out to a separate function and tests are added.

Similar code paths in other places are adjusted to use the new function.
2015-01-11 23:41:41 -05:00
..
.gitignore test: generate tests for OrderedHashmap from Hashmap tests 2014-10-23 17:38:02 +02:00
Makefile
test-architecture.c condition: properly allow passing back errors from condition checks 2014-11-06 14:21:10 +01:00
test-async.c
test-barrier.c test-barrier: add checks after the barrier constructor 2014-10-03 04:04:42 +02:00
test-boot-timestamps.c treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
test-btrfs.c machined: add support for reporting image size via btrfs quota 2014-12-28 02:08:40 +01:00
test-calendarspec.c calendarspec: parse 'quarterly' and 'semi-annually' as shortcuts 2014-10-27 18:09:26 +01:00
test-cap-list.c capability: use /proc/sys/kernel/cap_last_cap 2014-12-29 14:05:38 +01:00
test-capability.c treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
test-cgroup-mask.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-cgroup-util.c treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1 2014-11-28 20:55:04 +01:00
test-cgroup.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-condition.c test-condition: add more test cases 2014-12-11 18:32:57 +01:00
test-conf-files.c treewide: convert some left-over (usec_t) -1 to USEC_INFINITY 2014-11-28 20:55:04 +01:00
test-copy.c machined: when cloning a raw disk image, also set the NOCOW flag 2015-01-08 23:13:45 +01:00
test-daemon.c
test-date.c
test-device-nodes.c
test-ellipsize.c
test-engine.c Make bus errno mappings non-static 2014-10-31 11:32:00 -04:00
test-env-replace.c
test-execute.c test-execute: add tests for UMask directive 2014-12-11 18:32:57 +01:00
test-fdset.c
test-fileio.c env-util: don't include files from src/core/ 2014-12-23 19:15:27 +01:00
test-fstab-util.c Add new function to filter fstab options 2015-01-11 23:41:41 -05:00
test-hashmap-plain.c test: hashmap-plain - make coverity happy 2014-11-05 16:54:22 +01:00
test-hashmap.c test: generate tests for OrderedHashmap from Hashmap tests 2014-10-23 17:38:02 +02:00
test-helper.h
test-hostname.c treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
test-id128.c
test-install.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-ipcrm.c
test-job-type.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-json.c shared: json - support escaping utf16 surrogate pairs 2014-12-22 20:27:20 +01:00
test-libudev.c udev: switch to systemd logging functions 2014-11-13 13:12:57 +01:00
test-list.c shared/list: add LIST_APPEND 2015-01-11 18:17:33 -05:00
test-locale-util.c tests: add test-locale-util 2014-10-31 10:57:21 +01:00
test-log.c
test-loopback.c test: loopback - parse logging env var 2014-12-29 01:59:49 +01:00
test-namespace.c
test-ns.c treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
test-path-lookup.c test-path-lookup: add simple test for path lookup functions 2015-01-11 18:17:33 -05:00
test-path-util.c systemctl: refuse to edit runtime dropins when they already exist in /etc 2014-12-16 00:30:34 -05:00
test-path.c tree-wide: spelling fixes 2014-12-30 20:07:04 -05:00
test-prioq.c
test-pty.c tree-wide: use our memset() macros instead of memset() itself 2014-12-11 16:58:45 +01:00
test-ratelimit.c
test-replace-var.c
test-ring.c tree-wide: use our memset() macros instead of memset() itself 2014-12-11 16:58:45 +01:00
test-rtnl-manual.c
test-sched-prio.c tests: fix some tests to pass in koji 2014-10-12 17:31:02 -04:00
test-set.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-sigbus.c journald: process SIGBUS for the memory maps we set up 2015-01-05 01:40:51 +01:00
test-sleep.c
test-socket-util.c treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
test-strbuf.c treewide: correct spacing near eol in code comments 2014-12-11 15:10:03 +01:00
test-strip-tab-ansi.c
test-strv.c strv: ass new strv_is_uniq() and strv_reverse() calls 2014-12-19 02:07:42 +01:00
test-strxcpyx.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-tables.c core: rearrange code so that libsystemd/sd-bus/ does not include header files from core 2014-12-23 19:15:27 +01:00
test-time.c
test-tmpfiles.c test: only use assert_se 2014-10-04 23:55:35 +02:00
test-udev.c tmpfiles: add new line type 'v' for creating btrfs subvolumes 2014-12-28 02:08:40 +01:00
test-uid-range.c treewide: introduce UID_INVALID (and friends) as macro for (uid_t) -1 2014-11-28 20:55:04 +01:00
test-unaligned.c shared: unaligned - use void* instead of unaligned be16_t* 2014-11-05 16:54:22 +01:00
test-unit-file.c load-fragment: allow quoting in command name and document allowed escapes 2014-12-18 19:26:21 -05:00
test-unit-name.c test-unit-name: add more tests 2014-12-13 15:12:38 +01:00
test-utf8.c shared: utf8 - support decoding the full utf16 2014-12-22 20:26:53 +01:00
test-util.c test-util: make sure that masking and overriding works 2015-01-11 18:17:33 -05:00
test-verbs.c test-verbs: add unit tests for verbs minilib 2015-01-08 15:57:38 -05:00
test-watchdog.c treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
test-xml.c