Commit Graph

40058 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 390f0875e4 TODO: update 2019-05-22 10:10:51 +02:00
Zbigniew Jędrzejewski-Szmek 0e85cbcfc3 util-lib: do not truncate kernel comm names
It turns out that the kernel allows comm names higher than our expected limit
of 16.
$ wc -c /proc/*/comm|sort -g|tail -n3
35 /proc/1292317/comm
35 /proc/1293610/comm
36 /proc/1287112/comm
$ cat /proc/1287112/comm
kworker/u9:3-kcryptd/253:0
2019-05-22 10:09:35 +02:00
Zbigniew Jędrzejewski-Szmek bc28751ed2 Rework cmdline printing to use unicode
The functions to retrieve and print process cmdlines were based on the
assumption that they contain printable ASCII, and everything else
should be filtered out. That assumption doesn't hold in today's world,
where people are free to use unicode everywhere.

This replaces the custom cmdline reading code with a more generic approach
using utf8_escape_non_printable_full().
For kernel threads, truncation is done on the parenthesized name, so we'll
get "[worker]", "[worker…]", …, "[w…]", "[…", "…" as we reduce the number of
available columns.

This implementation is most likely slower for very long cmdlines, but I don't
think this is very important. The common case is to have short commandlines,
and should print those properly. Absurdly long cmdlines are the exception,
which needs to be handled correctly and safely, but speed is not too important.

Fixes #12532.

v2:
- use size_t for the number of columns. This change propagates into various
  other functions that call get_process_cmdline(), increasing the size of the
  patch, but the changes are rather trivial.
2019-05-22 10:08:17 +02:00
Zbigniew Jędrzejewski-Szmek da88f542d9 util-lib: add truncation based on printable width to utf8_escape_non_printable() 2019-05-22 09:50:19 +02:00
Zbigniew Jędrzejewski-Szmek 31c294dc41 shared/cgroup-show: fix off-by-one in column counting
We'd get one column too many, and the trailing ellipsis would end up in
the next row.
2019-05-21 10:57:23 +02:00
Zbigniew Jędrzejewski-Szmek 9743846e23 test-utf8: add function headers and rename tests after functions they test 2019-05-21 10:57:23 +02:00
Zbigniew Jędrzejewski-Szmek 21c491e106 Introduce sc_arg_max() helper
Just a cast and an assert.
2019-05-21 10:57:23 +02:00
Zbigniew Jędrzejewski-Szmek 77599f06e1 cgtop,test: use consistent capitalization for CGroup 2019-05-21 10:57:23 +02:00
Yu Watanabe d7c5b3ec3e
Merge pull request #12510 from keszybz/test-directives
test: run check-directives.sh as part of the test suite
2019-05-21 08:35:10 +09:00
Yu Watanabe 3041250a9f
Merge pull request #12519 from keszybz/man-on-demand
Build man pages on demand only
2019-05-21 08:25:26 +09:00
Joe Lin 88e94c3810 meson-vcs-tag: enhance version info generation
When build from release tarball and where there is parent .git dir,
this situtaion will get wrong version info. (build with buildroot)

The systemd running show wrong version in dmesg log:
systemd[1]: systemd 2019.02-1086-gf5f17c4 running in system mode.
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Shoule be:
systemd[1]: systemd 241 running in system mode. (-PAM -AUDIT -SEL
            ^^^^^^^^^^^
2019-05-21 07:53:40 +09:00
Kashyap Chamarthy 336351dc52 man: systemd-nspawn: Update syntax to launch an image
To access a shell on a disk image, the man page on Fedora-29 says to
run: `systemd-nspawn -M Fedora-Cloud-Base-28-1.1.x86_64.raw`.  Let's
try.

List existing images:

    $> machinectl list-images | awk '{print $1,$2}';
    NAME TYPE
    Fedora-Cloud-Base-30… raw

    1 images

Now invoke `systemd-nspawn` as noted in the man page:

    $> systemd-nspawn -M Fedora-Cloud-Base-30-1.2.x86_64.raw
    No image for machine 'Fedora-Cloud-Base-30-1.2.x86_64.raw'.

Removing the ".raw" extension launches the image and gives a shell.
Update the man page to reflect that.

Frantisek Sumsal on #systemd (Freenode) noted the reason: "In older
versions systemd -M accepted both image-name.raw and image-name as a
valid image names, however, on Fedora 29 (systemd-239) with all the
BTRFS stuff around it accepts only -M image-name (without the
extension)"

    - - -

While at it, update the fedora_{latest_version, cloud_release}
variables.

Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
2019-05-21 07:47:37 +09:00
Yu Watanabe 826c4f35c6
Merge pull request #12612 from keszybz/bootctl-column
Rename TEST-31-OOMPOLICY to avoid conflict and look in $BOOT for kernels
2019-05-21 07:45:12 +09:00
Yu Watanabe 0e0d424c0f sysctl: bump pid range only on 64-bit systems
Closes #12604.
2019-05-20 18:13:59 +02:00
Lennart Poettering 6980b04fb6 json: fix minor memory leak on error path 2019-05-20 18:12:48 +02:00
Topi Miettinen 0a51b45ce4 small fixes: make get_process_state() static and fix typo 2019-05-20 16:23:22 +02:00
Lennart Poettering 0f20dde52e
Merge pull request #12602 from keszybz/two-man-page-tweaks
Two man page tweaks
2019-05-20 16:22:57 +02:00
Zbigniew Jędrzejewski-Szmek f7ebc1e298 travis: use variable to avoid one call 2019-05-20 15:48:05 +02:00
Zbigniew Jędrzejewski-Szmek 9fd1a0babd tests: install perl for CI
It is useful for various tests (test-directives, test-udev, …).
2019-05-20 15:47:28 +02:00
Zbigniew Jędrzejewski-Szmek c6448ee39e test: run check-directives.sh as part of the test suite 2019-05-20 15:44:31 +02:00
Yu Watanabe a166cd3aac
Merge pull request #12603 from ssahani/ndisc-blacklist
networkd: Ability to selectively ignore IPv6 prefixes supplied via ro…
2019-05-19 23:19:27 +09:00
Yu Watanabe 030a5d78ed efivars: allow plus in the entry name
Closes #12572.
2019-05-19 16:00:27 +02:00
Susant Sahani e520ce6440 networkd: Ability to selectively ignore IPv6 prefixes supplied via router advertisement
Closes https://github.com/systemd/systemd/issues/10647
2019-05-19 22:23:06 +09:00
Zbigniew Jędrzejewski-Szmek d04876b143 TEST-32-OOMPOLICY: drop unneeded headers 2019-05-19 13:03:21 +02:00
Zbigniew Jędrzejewski-Szmek 5c305ce2db test: rename TEST-31-OOMPOLICY to TEST-32-OOMPOLICY
TEST-31-DEVICE-ENUMERATION got merged first.
2019-05-19 13:00:00 +02:00
Zbigniew Jędrzejewski-Szmek 95cff2a794 test: search $BOOT for kernel+initrd
$BOOT is the preferred location for kernel images. If $BOOT does not
exist, -x will print the path to ESP, so well fall back to previous
behaviour.
2019-05-19 12:05:21 +02:00
Zbigniew Jędrzejewski-Szmek aa467bcae1 bootctl: do not allow -x and -p to be used together
-x already prints the path to ESP in some circumstances, and allowing
both to be printed seems confusing.
2019-05-19 12:01:32 +02:00
Zbigniew Jędrzejewski-Szmek fba4e94506 bootctl: add -x shortcut for --print-boot-path
It's a quite useful option, let's match -p.
2019-05-19 11:55:36 +02:00
Evgeny Vereshchagin f572f79e18 tests: catch broken fuzz targets as early as possible
See https://github.com/google/oss-fuzz/pull/2419.
2019-05-19 12:48:12 +03:00
Zbigniew Jędrzejewski-Szmek 405b104df6 bootclt: add missing column
This got broken somehow in 44e6a5ef82.
2019-05-19 11:31:19 +02:00
Yu Watanabe a188bcffc3
Merge pull request #12577 from yuwata/test-network-issue-12344
test-network: fix test_bond_operstate
2019-05-19 09:26:14 +09:00
Yu Watanabe b26ea30801 network: tighten the condition whether link has carrier
ip command requires that IFF_RUNNING is set for that the link has
carrier.
2019-05-19 05:39:45 +09:00
Yu Watanabe 2700d2c7dc test-network: wait for bond interface to be no-carrier operational state 2019-05-19 05:39:45 +09:00
Yu Watanabe ce87a19087 test-network: enable universal_newline= flag for subprocess.check_output() 2019-05-19 05:39:21 +09:00
Yu Watanabe 4b3cf93507 test-network: remove unnecessary links 2019-05-19 05:29:25 +09:00
Yu Watanabe 3ccf7af087 test-network: fix underlying device name 2019-05-19 05:27:56 +09:00
Yu Watanabe 791c1140c9 test-network: use check_operstate() helper function where applicable 2019-05-19 05:27:56 +09:00
Yu Watanabe 2be0b6fc5e test-network: add get_operstate() and check_operstate() helper functions 2019-05-19 05:27:46 +09:00
David Tardon 525b95f10e timer: simplify computation of unit activation time 2019-05-18 16:58:27 +02:00
Yu Watanabe cdd22d5129 network: set_put() here does not returns -EEXIST 2019-05-18 12:46:02 +09:00
Yu Watanabe 5279914e2c network: use in6_addr_hash_ops 2019-05-18 12:29:40 +09:00
Yu Watanabe 2968913e64 util: introduce in6_addr_hash_ops 2019-05-18 12:27:27 +09:00
Yu Watanabe ad2997a7b0 man: move Blacklist= in [DHCP] section 2019-05-18 12:27:27 +09:00
Yu Watanabe e7b621ee1f
Merge pull request #12586 from ssahani/route-properties
Route properties
2019-05-18 10:31:37 +09:00
Susant Sahani 9b88f20aba networkd: route add MPLS TTL propagate 2019-05-18 10:30:41 +09:00
Yu Watanabe c9f0f21e28
Merge pull request #12593 from AdrianBunk/master
Small changes from Yocto/musl builds
2019-05-18 10:25:59 +09:00
Susant Sahani 8f02c9b085 networkd: FOU netdev add support to configure peer port 2019-05-18 10:25:36 +09:00
Zbigniew Jędrzejewski-Szmek 2eca7635f4 man: rework forward/reverse table in systemd.unit(5)
Fixes #12600.
2019-05-17 15:41:21 +02:00
Zbigniew Jędrzejewski-Szmek a37ef4550e man: add missing =
Fixes #12598.
2019-05-17 15:41:21 +02:00
Zbigniew Jędrzejewski-Szmek be44e09162 shared/varlink: add missing setting of output_buffer_allocated
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14708,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14735,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14725,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14720,
and probably others.
2019-05-17 15:09:32 +02:00