1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00
systemd/src/test
Chris Down 3f1c1287a9 analyze: Add "timespan" command to dump time span in usec
This is useful for a couple of cases, I'm mostly interested in case #1:

1. Verifying "reasonable" values in a trivially scriptable way
2. Debugging unexpected time span parsing directly

Test Plan:

```
% build/systemd-analyze timespan 20
Original: 20
      μs: 20
   Human: 20us
% build/systemd-analyze timespan 20ms
Original: 20ms
      μs: 20000
   Human: 20ms
% build/systemd-analyze timespan 20z
Failed to parse time span '20z': Invalid argument
```
2018-10-23 14:26:51 +02:00
..
generate-sym-test.py
meson.build test: add tests for sd_device_monitor 2018-10-19 18:07:53 +09:00
test-acl-util.c user-util: rework get_user_creds() 2018-08-20 15:58:21 +02:00
test-af-list.c tree-wide: replace 'unsigned int' with 'unsigned' 2018-10-19 22:19:12 +02:00
test-alloc-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-architecture.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-arphrd-list.c tree-wide: replace 'unsigned int' with 'unsigned' 2018-10-19 22:19:12 +02:00
test-ask-password-api.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-async.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-barrier.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-bitmap.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-boot-timestamps.c test: shorten test-boot-timestamps a bit 2018-10-08 21:40:44 +02:00
test-bpf.c manager: rework test flags set 2018-10-09 19:43:43 +02:00
test-btrfs.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-bus-util.c bus-util: drop now-unused functions 2018-09-20 16:52:02 +02:00
test-calendarspec.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-cap-list.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-capability.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-cgroup-mask.c core: support cgroup v2 device controller 2018-10-09 09:47:51 -07:00
test-cgroup-util.c Merge pull request #10059 from yuwata/env-exec-directory 2018-09-25 12:34:30 +02:00
test-cgroup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-clock.c tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
test-condition.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-conf-files.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-conf-parser.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-copy.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-cpu-set-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-daemon.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-date.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-device-nodes.c tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
test-dissect-image.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-dlopen.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-dns-domain.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-ellipsize.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-emergency-action.c units: allow and use SuccessAction=exit-force in system systemd-exit.service 2018-10-17 19:32:07 +02:00
test-engine.c tests: add a helper function to skip with errno 2018-09-14 09:29:57 +02:00
test-env-util.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-escape.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-exec-util.c exec-util: in execute_directories, support initial exec environment 2018-09-24 13:40:10 +01:00
test-execute.c test-execute: add a test for systemcall filter (#10273) 2018-10-05 14:46:30 +09:00
test-extract-word.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-fd-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-fdset.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-fileio.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-firewall-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-format-table.c test: add a reproducer of issue #9549 2018-07-15 17:07:18 +09:00
test-fs-util.c test: fix memleak in test-fs-util 2018-10-04 16:24:44 +09:00
test-fstab-util.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-gcrypt-util.c Fix SPDX license tags 2018-06-14 13:05:41 +02:00
test-glob-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-hash.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-hashmap-ordered.awk
test-hashmap-plain.c tests: centralize check for slow tests 2018-09-13 12:07:27 +02:00
test-hashmap.c tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
test-helper.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-helper.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
test-hexdecoct.c tree-wide: some automatic coccinelle fixes (#10463) 2018-10-20 00:07:46 +09:00
test-hostname-util.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-hostname.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-id128.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-in-addr-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-install-root.c shared/install: avoid overwriting 'r' counter with a partial result 2018-10-02 15:36:24 +02:00
test-install.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-io-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-ipcrm.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-job-type.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-journal-importer.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-json.c test: use fabsl instead of fabs as json_variant_real() returns 'long double' 2018-10-14 03:29:43 +09:00
test-libudev.c udev: move udev cleanup functions from udev-util.h to udev.h 2018-08-23 04:57:39 +09:00
test-list.c tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
test-locale-util.c analyze: Add "timespan" command to dump time span in usec 2018-10-23 14:26:51 +02:00
test-log.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-loopback.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-mount-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-namespace.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-netlink-manual.c tests: add a helper function to skip with errno 2018-09-14 09:29:57 +02:00
test-ns.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-nss.c test: sort included headers 2018-10-12 17:54:23 +09:00
test-os-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-parse-util.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-path-lookup.c Merge pull request #10070 from keszybz/test-reporting 2018-09-15 15:55:15 +09:00
test-path-util.c path-util: fix path_simplify() with kill_dots and "." 2018-10-05 21:41:33 +02:00
test-path.c tests: add a helper function to skip with errno 2018-09-14 09:29:57 +02:00
test-prioq.c test: add one more test for prioq_remove() 2018-10-17 01:18:10 +09:00
test-proc-cmdline.c test: check for putenv() failures, the call might theortically fail 2018-10-18 16:40:12 +02:00
test-process-util.c Merge pull request #10138 from yuwata/test-check-container 2018-10-01 10:09:54 +02:00
test-procfs-util.c Correct a number of trivial typos. 2018-06-18 22:44:44 +02:00
test-random-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-ratelimit.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-replace-var.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-rlimit-util.c tree-wide: drop 'This file is part of systemd' blurb 2018-06-14 10:20:20 +02:00
test-sched-prio.c tests: add a helper function to skip with errno 2018-09-14 09:29:57 +02:00
test-sd-hwdb.c test-sd-hwdb: skip tests if hwdb cannot be opened 2018-10-01 15:22:55 +02:00
test-seccomp.c seccomp: reduce logging about failure to add syscall to seccomp 2018-09-24 17:21:09 +02:00
test-selinux.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-set-disable-mempool.c test: add tests for $SYSTEMD_MEMPOOL= 2018-10-12 17:54:23 +09:00
test-set.c Drop my copyright headers 2018-06-14 13:03:20 +02:00
test-sigbus.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-signal-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-siphash24.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-sizeof.c test-sizeof: another aproach to _Float128 availability detection 2018-06-20 17:06:21 +02:00
test-sleep.c shared/sleep-config: add switches to kill specific sleep modes 2018-10-08 18:21:00 +02:00
test-socket-util.c socket-util: include trailing NUL byte in SOCKADDR_UN_LEN() count for fs sockets 2018-10-15 19:40:51 +02:00
test-specifier.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-stat-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-strbuf.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-string-util.c Introduce free_and_strndup and use it in bus-message.c 2018-10-02 11:42:45 +02:00
test-strip-tab-ansi.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-strv.c test: add tests for strv_split_full() 2018-09-26 22:50:02 +09:00
test-strxcpyx.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-systemd-tmpfiles.py shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
test-tables.c Merge pull request #9685 from yuwata/fix-9663 2018-07-23 21:17:07 +02:00
test-terminal-util.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-time-util.c parse-util: make sure "3.+1s" or "3. 1s" are not considered valid time specification 2018-07-19 22:09:54 -07:00
test-tmpfiles.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-udev.c test-udev: sprinkle (void) and assert_se() as necessary 2018-10-09 10:21:17 +02:00
test-uid-range.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-umount.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-unaligned.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test-unit-file.c shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
test-unit-name.c shared: add %g, %G specifiers for group / gid (#10368) 2018-10-13 17:26:48 +09:00
test-user-util.c user-util: rework get_user_creds() 2018-08-20 15:58:21 +02:00
test-utf8.c utf8: add utf8_to_utf16() helper 2018-09-25 15:57:47 +02:00
test-util.c test: cast values in proper type to suppress warnings 2018-08-07 15:40:16 +02:00
test-verbs.c Drop copyrights tags for "systemd authors" 2018-06-20 12:11:12 +02:00
test-watch-pid.c manager: rework test flags set 2018-10-09 19:43:43 +02:00
test-watchdog.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-web-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
test-xattr-util.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-xml.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00