Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions debian/authd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Description=authd daemon service
After=authd.socket
Requires=authd.socket
PartOf=authd.socket
# AccountsService starts after this target to populate the GDM user list.
Before=nss-user-lookup.target
Comment on lines +6 to +7

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this is needed if the service needs the socket that should be before the lookup?


[Service]
Type=notify
Expand Down
2 changes: 2 additions & 0 deletions debian/authd.socket
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Wants=dbus.service
After=dbus.service
Before=nss-user-lookup.target
Wants=nss-user-lookup.target
# Start the daemon before AccountsService queries NSS for its cached users.
Wants=authd.service

[Socket]
ListenStream=/run/authd.sock
Expand Down
5 changes: 5 additions & 0 deletions e2e-tests/resources/utils.resource
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ Wait Until GDM Login Screen Ready
BuiltIn.Sleep 2


Wait Until System Is Running Or Degraded
Wait Until Keyword Succeeds 3 min 1 sec
... SSH.Execute output=$(systemctl is-system-running --wait) || [ "$output" = degraded ]


Wait Until Desktop Ready
Wait Until Keyword Succeeds 1 min 1 sec
... Try Desktop Ready
Expand Down
29 changes: 29 additions & 0 deletions e2e-tests/tests/gdm_managed_user_after_reboot.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
*** Settings ***
Resource resources/utils.resource
Resource resources/authd.resource
Resource resources/broker.resource

Test Setup utils.Test Setup snapshot=%{BROKER}-installed
Test Teardown utils.Test Teardown


*** Variables ***
${username} %{E2E_USER}
${local_password} qwer1234


*** Test Cases ***
Managed user is listed by GDM after reboot
[Documentation] Verify that GDM discovers an existing managed user during boot.
...
... Do not query NSS after the reboot: that would activate authd and
... hide the startup-ordering regression this test covers.
Log In With Remote User Through GDM: QR Code ${username} ${local_password}
Log Out
${display_name} = SSH.Execute getent passwd ${username} | cut -d: -f5 | cut -d, -f1

Comment on lines +23 to +24
Run Keyword And Ignore Error SSH.Execute systemctl reboot
Wait Until System Is Running Or Degraded

Wait Until GDM Login Screen Ready
Match Text ${display_name} 30
8 changes: 7 additions & 1 deletion e2e-tests/vm/lib/libprovision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,16 @@ function force_create_snapshot() {

if virsh domstate "${VM_NAME}" | grep -q '^running'; then
# If the VM is running, we have to use --memspec to create the snapshot
local memfile="${IMAGE%.qcow2}-${snapshot_name}.mem"
# Libvirt's default disk filename is derived from the snapshot name.
# A failed or metadata-only-deleted snapshot can leave that file behind.
local snapshot_id
snapshot_id="$(date +%s%N)"
local diskfile="${IMAGE%.qcow2}.${snapshot_name}.${snapshot_id}"
local memfile="${IMAGE%.qcow2}-${snapshot_name}.${snapshot_id}.mem"
time virsh snapshot-create-as \
--domain "${VM_NAME}" \
--name "${snapshot_name}" \
--diskspec "vda,file=${diskfile},snapshot=external" \
--memspec "${memfile},snapshot=external"
return
fi
Expand Down