From: Frantisek Sumsal Date: Wed, 8 Mar 2023 15:18:09 +0000 (+0100) Subject: test: add a couple of tests for systemd-id128 X-Git-Tag: v254-rc1~1092^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb076d77f45c61e149eaccac1a027a682540aaec;p=thirdparty%2Fsystemd.git test: add a couple of tests for systemd-id128 --- diff --git a/test/units/testsuite-74.id128.sh b/test/units/testsuite-74.id128.sh new file mode 100755 index 00000000000..6a9d2135c03 --- /dev/null +++ b/test/units/testsuite-74.id128.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: LGPL-2.1-or-later +set -eux +set -o pipefail + +# shellcheck source=test/units/assert.sh +. "$(dirname "$0")"/assert.sh + +systemd-id128 --help +systemd-id128 help +systemd-id128 show +systemd-id128 show --pretty | tail -n10 +systemd-id128 show 4f68bce3e8cd4db196e7fbcaf984b709 # root-x86-64 +systemd-id128 show --pretty 4f68bce3e8cd4db196e7fbcaf984b709 + +[[ "$(systemd-id128 new | wc -c)" -eq 33 ]] +systemd-id128 new -p +systemd-id128 new -u +systemd-id128 new -a 4f68bce3e8cd4db196e7fbcaf984b709 + +systemd-id128 machine-id +systemd-id128 machine-id --pretty +systemd-id128 machine-id --uuid +systemd-id128 machine-id --app-specific=4f68bce3e8cd4db196e7fbcaf984b709 +assert_eq "$(systemd-id128 machine-id)" "$(