1
0
mirror of https://github.com/systemd/systemd synced 2025-09-30 17:24:46 +02:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Jack Wu
46a688c559 hwdb: enable autosuspend for Dell DW5826e WWAN modem 2025-08-22 23:38:08 +01:00
Luca Boccassi
a4f9ddbbe7
TEST-46-HOMED: improve stability of the test (#38659)
Fixes #38643.
2025-08-22 23:37:52 +01:00
Yu Watanabe
aed28d0c57 TEST-46-HOMED: homectl unregister and friends needs the target is inactive or absent
Hence, we need to wait for the previous operation finished.
Fixes the following failure:
```
TEST-46-HOMED.sh[107]: + homectl unregister signtest
TEST-46-HOMED.sh[1449]: Failed to unregister home: Home signtest is currently being used, or an operation on home signtest is currently being executed.
```

Fixes #38643
2025-08-22 02:28:58 +09:00
Yu Watanabe
5fb7b67556 TEST-46-HOMED: cleanup homedsshtest earlier 2025-08-22 01:11:35 +09:00
2 changed files with 16 additions and 5 deletions

View File

@ -96,6 +96,10 @@ usb:v2CB7p0007*
ID_AUTOSUSPEND=1
ID_AUTOSUSPEND_DELAY_MS=7000
# Dell Computer Corp. DW5826e Qualcomm Snapdragon X12 Global LTE-A
usb:v413Cp8217*
ID_AUTOSUSPEND=1
#########################################
# Wacom
#########################################

View File

@ -544,6 +544,7 @@ if command -v ssh &>/dev/null && command -v sshd &>/dev/null && ! [[ -v ASAN_OPT
systemctl is-active -q mysshserver.socket && systemctl stop mysshserver.socket
rm -f /tmp/homed.id_ecdsa /run/systemd/system/mysshserver{@.service,.socket}
systemctl daemon-reload
wait_for_state homedsshtest inactive
homectl remove homedsshtest
for dir in /etc /usr/lib; do
if [[ -f "$dir/pam.d/sshd.bak" ]]; then
@ -631,8 +632,8 @@ EOF
-o "SetEnv PASSWORD=hunter4711" -o "StrictHostKeyChecking no" \
homedsshtest@localhost env
wait_for_state homedsshtest inactive
homectl remove homedsshtest
trap - EXIT
at_exit
fi
NEWPASSWORD=hunter4711 homectl create aliastest --storage=directory --alias=aliastest2 --alias=aliastest3 --realm=myrealm
@ -747,6 +748,7 @@ IDENTITY='{"userName":"signtest","storage":"directory","disposition":"regular","
# Try with stripping the foreign signature first, this should just work
echo "$IDENTITY" | homectl create -P --identity=- --seize=yes
wait_for_state signtest inactive
homectl remove signtest
# No try again, and don't strip the signature. It will be refused.
@ -773,6 +775,7 @@ echo "$IDENTITY" | homectl create -P --identity=- --seize=no
PASSWORD="test" homectl with signtest true
# Remove the key, and check again ,should fail now
wait_for_state signtest inactive
homectl remove-signing-key signtest.public
wait_for_state signtest inactive
(! PASSWORD="test" homectl with signtest true)
@ -784,15 +787,17 @@ homectl list-signing-keys | grep -q local.public
# Test unregister + adopt
mkdir /home/elsewhere
mv /home/signtest.homedir /home/elsewhere/
wait_for_state signtest absent
homectl unregister signtest
print_public_key | homectl add-signing-key --key-name=signtest.public
homectl adopt /home/elsewhere/signtest.homedir
PASSWORD="test" homectl with signtest true
wait_for_state signtest inactive
# Test register
wait_for_state signtest inactive
homectl unregister signtest
homectl register /home/elsewhere/signtest.homedir/.identity
wait_for_state signtest absent
homectl unregister signtest
# Test automatic fixation for anything in /home/
@ -800,9 +805,9 @@ mv /home/elsewhere/signtest.homedir /home
rmdir /home/elsewhere
wait_for_exist signtest
PASSWORD="test" homectl with signtest true
wait_for_state signtest inactive
# add signing key via credential
wait_for_state signtest inactive
homectl remove-signing-key signtest.public
(! (homectl list-signing-keys | grep -q signtest.public))
systemd-run --wait -p "SetCredential=home.add-signing-key.signtest.public:$(print_public_key)" homectl firstboot
@ -811,15 +816,17 @@ homectl list-signing-keys | grep -q signtest.public
# register user via credential
mkdir /home/elsewhere2
mv /home/signtest.homedir /home/elsewhere2/
wait_for_state signtest absent
homectl unregister signtest
systemd-run --wait -p "LoadCredential=home.register.signtest:/home/elsewhere2/signtest.homedir/.identity" homectl firstboot
homectl inspect signtest
wait_for_state signtest absent
homectl unregister signtest
mv /home/elsewhere2/signtest.homedir /home/
rmdir /home/elsewhere2
wait_for_exist signtest
# Remove it all again
wait_for_exist signtest
homectl remove-signing-key signtest.public
homectl remove signtest