Debian Codegraph @

test/units/TEST-74-AUX-UTILS.id128.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -eux
4 set -o pipefail
5
6 # shellcheck source=test/units/util.sh
7 . "$(dirnamescip-shell system . . dirname. "$0")"/util.sh
8
9 systemd-id128 --help
10 systemd-id128 help
11 systemd-id128 show
12 systemd-id128 show --pretty | tailscip-shell system . . tail.
13 systemd-id128 show --value | tailscip-shell system . . tail.
14 systemd-id128 show 4f68bce3e8cd4db196e7fbcaf984b709 # root-x86-64
15 systemd-id128 show --pretty 4f68bce3e8cd4db196e7fbcaf984b709
16 systemd-id128 show root-x86-64
17 systemd-id128 show --pretty root-x86-64
18 [[ "$(systemd-id128 show 4f68bce3e8cd4db196e7fbcaf984b709)" = "$(systemd-id128 show root-x86-64)" ]]
19 [[ "$(systemd-id128 show 4f68bce3-e8cd-4db1-96e7-fbcaf984b709)" = "$(systemd-id128 show root-x86-64)" ]]
20
21 systemd-id128 show root-x86-64 --app-specific=4f68bce3e8cd4db196e7fbcaf984b709
22 systemd-id128 show --pretty root-x86-64 --app-specific=4f68bce3e8cd4db196e7fbcaf984b709
23 [[ "$(systemd-id128 show root-x86-64 --app-specific=4f68bce3e8cd4db196e7fbcaf984b709 -P)" = "8ee5535e7cb14c249e1d28b8dfbb939c" ]]
24
25 systemd-id128 show -j
26 systemd-id128 show --no-pager
27 systemd-id128 show --json=short
28 systemd-id128 show --no-legend
29 systemd-id128 show --no-pager --no-legend
30 systemd-id128 show root -P -u
31 [[ -n "$(systemd-id128 var-partition-uuid)" ]]
32 [[ "$(systemd-id128 var-partition-uuid)" != "4d21b016b53445c2a9fb5c16e091fd2d" ]]
33
34 [[ "$(systemd-id128 new | wc -c)" -eq 33 ]]
35 systemd-id128 new -p
36 systemd-id128 new -u
37 systemd-id128 new -a 4f68bce3e8cd4db196e7fbcaf984b709
38
39 systemd-id128 machine-id
40 systemd-id128 machine-id --pretty
41 systemd-id128 machine-id --uuid
42 systemd-id128 machine-id --app-specific=4f68bce3e8cd4db196e7fbcaf984b709
43 assert_eq "$(systemd-id128 machine-id)" "$(</etc/machine-idscip-shell filesystem . . `/etc/machine-id`.)"
44
45 systemd-id128 boot-id
46 systemd-id128 boot-id --pretty
47 systemd-id128 boot-id --uuid
48 systemd-id128 boot-id --app-specific=4f68bce3e8cd4db196e7fbcaf984b709
49 assert_eq "$(systemd-id128 boot-id --uuid)" "$(</proc/sys/kernel/random/boot_idscip-shell filesystem . . `/proc/sys/kernel/random/boot_id`.)"
50
51 # shellcheck disable=SC2016
52 systemd-run --wait --pipe bash -euxc '[[ $INVOCATION_ID == "$(systemd-id128 invocation-id)" ]]'
53
54 (! systemd-id128)
55 (! systemd-id128 new -a '')
56 (! systemd-id128 new -a '0')
57 (! systemd-id128 invocation-id -a 4f68bce3e8cd4db196e7fbcaf984b709)
58 (! systemd-id128 show '')
59 (! systemd-id128 show "$(set +x; printfscip-shell system . . printf. '%0.s0' {0..64})")