]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: use jq // empty instead of grep -v null in Unit.List tests 41980/head
authorIvan Kruglov <mail@ikruglov.com>
Thu, 7 May 2026 17:55:32 +0000 (10:55 -0700)
committerIvan Kruglov <mail@ikruglov.com>
Mon, 11 May 2026 11:32:14 +0000 (04:32 -0700)
commitcb3a1a1b2fcac82918aa2902f870f6aed6b966f1
tree5e8b2bab21d7911d54a28d89f12f996038231af5
parentae619b12240b5eff5d580a5def3a7fc4b3cbb9dc
test: use jq // empty instead of grep -v null in Unit.List tests

Replace `grep -v null` with jq's `// empty` alternative operator when filtering unit IDs. With `set -o pipefail`, `grep` returns 1 when no lines match, which aborts the script before conditional guards can run. The `// empty` operator suppresses null output directly in jq without risking a pipeline failure.
test/units/TEST-74-AUX-UTILS.varlinkctl.sh