[0.00s] Machine state will be reset. To keep it, pass --keep-machine-state [0.00s] start all VLans [0.00s] (finished: start all VLans, in 0.00 seconds) Initializing machine ID from random generator. [0.02s] Test will time out and terminate in 300.0 seconds [0.02s] run the VM test script additionally exposed symbols: machine, vlan1, start_all, test_script, machines, machines_qemu, machines_nspawn, vlans, driver, log, os, create_machine, subtest, run_tests, join_all, retry, serial_stdout_off, serial_stdout_on, polling_condition, BaseMachine, QemuMachine, NspawnMachine, t, debug, dump_machine_ssh [0.03s] machine: systemd-nspawn running (pid 50) [0.03s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal... [0.03s] machine: waiting for unit multi-user.target nixos-nspawn(machine): TAP vde-tap1 not found; container will be isolated from VDE nixos-nspawn(machine): A common reason for this is that /dev/net is not available in the Nix sandbox. Try adding /dev/net to extra-sandbox-paths. Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file. ░ Spawning container machine on /build/vm-state-machine. machine # No journal files were found. machine # No journal boot entry found for the specified boot (+0). machine # [643543.318972] machine systemd-journald[58]: Journal started machine # [643543.319062] machine systemd-journald[58]: Runtime Journal (/run/log/journal/582b20f914b349c688e924b71a758821) is 8M, max 1.2G, 1.2G free. machine # [643543.358691] machine systemd[1]: Finished Apply Kernel Variables. machine # [643543.382457] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully. machine # [643543.403206] machine systemd[1]: Starting Flush Journal to Persistent Storage... machine # [643543.403925] machine systemd[1]: Starting Create Static Device Nodes in /dev... machine # [643543.422980] machine systemd-journald[58]: Time spent on flushing to /var/log/journal/582b20f914b349c688e924b71a758821 is 1.271ms for 6 entries. machine # [643543.422980] machine systemd-journald[58]: System Journal (/var/log/journal/582b20f914b349c688e924b71a758821) is 8M, max 4G, 3.9G free. machine # [643543.441796] machine systemd[1]: Finished Flush Journal to Persistent Storage. machine # [643543.442074] machine systemd[1]: Finished Create Static Device Nodes in /dev. machine # [643543.443091] machine systemd[1]: Reached target Preparation for Local File Systems. machine # [643543.443237] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys machine # [643543.458836] machine systemd[1]: Finished Firewall. machine # [643544.319297] machine systemd[1]: Mounting /run/wrappers... machine # [643544.351941] machine systemd[1]: Mounted /run/wrappers. machine # [643544.352608] machine systemd[1]: Reached target Local File Systems. machine # [643544.353533] machine systemd[1]: Listening on Boot Loader Control Service Socket. machine # [643544.354360] machine systemd[1]: Starting Create SUID/SGID Wrappers... machine # [643544.354397] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container machine # [643544.355154] machine systemd[1]: Starting Save Transient machine-id to Disk... machine # [643544.357181] machine systemd[1]: Starting Create System Files and Directories... machine # [643544.390101] machine systemd-tmpfiles[164]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted machine # [643544.390532] machine suid-sgid-wrappers-start[171]: chmod: changing permissions of '/run/wrappers/wrappers.ssMwI7nHzs/chsh': Operation not permitted machine # [643544.391208] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE machine # [643544.391266] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available machine # [643544.391325] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available machine # [643544.391358] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'. machine # [643544.391554] machine systemd[1]: Failed to start Create SUID/SGID Wrappers. machine # [643544.391845] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal failed: Operation not permitted machine # [643544.392036] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal/582b20f914b349c688e924b71a758821 failed: Operation not permitted machine # [643544.392297] machine systemd-tmpfiles[164]: fchmod() of /run/log/journal failed: Operation not permitted machine # [643544.393641] machine systemd[1]: Finished Create System Files and Directories. machine # [643544.415043] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully. machine # [643544.435764] machine systemd[1]: Finished Save Transient machine-id to Disk. machine # [643544.437347] machine systemd[1]: Starting Rebuild Journal Catalog... machine # [643544.438060] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP... machine # [643544.457428] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP. machine # [643544.472836] machine systemd[1]: Finished Rebuild Journal Catalog. machine # [643544.474361] machine systemd[1]: Starting Update is Completed... machine # [643544.490507] machine systemd[1]: Finished Update is Completed. machine # [643544.490693] machine systemd[1]: Reached target System Initialization. machine # [643544.490777] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container machine # [643544.490809] machine systemd[1]: Started Daily Cleanup of Temporary Directories. machine # [643544.490838] machine systemd[1]: Reached target Timer Units. machine # [643544.490967] machine systemd[1]: Listening on D-Bus System Message Bus Socket. machine # [643544.491770] machine systemd[1]: Starting GitHub agent auth broker socket... machine # [643544.491938] machine systemd[1]: Listening on Nix Daemon Socket. machine # [643544.493547] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export). machine # [643544.494861] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local). machine # [643544.495663] machine systemd[1]: Listening on SSH Socket. machine # [643544.495796] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket. machine # [643544.498622] machine systemd[1]: Listening on GitHub agent auth broker socket. machine # [643544.498689] machine systemd[1]: Reached target Socket Units. machine # [643544.498744] machine systemd[1]: Reached target Basic System. machine # [643544.499721] machine systemd[1]: Starting Import lastlog data into lastlog2 database... machine # [643544.500663] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [643544.502801] machine systemd[1]: Starting resolvconf update... machine # [643544.502833] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met. machine # [643544.531468] machine systemd[1]: Finished Import lastlog data into lastlog2 database. machine # [643544.566023] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available machine # [643544.566071] machine systemd[1]: nscd.service: Deactivated successfully. machine # [643544.566259] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd). machine # [643544.568593] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [643544.577852] machine resolvconf-start[239]: setfacl: /run/resolvconf: Operation not supported machine # [643544.578971] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE machine # [643544.579043] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [643544.579102] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [643544.579141] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'. machine # [643544.579360] machine systemd[1]: Failed to start resolvconf update. machine # [643544.579533] machine systemd[1]: Reached target Preparation for Network. machine # [643544.580558] machine systemd[1]: Starting Address configuration of eth1... machine # [643544.581623] machine systemd[1]: Starting Extra networking commands.... machine # [643544.603152] machine network-addresses-eth1-start[242]: adding address 192.168.1.1/24... done machine # [643544.606373] machine network-addresses-eth1-start[242]: adding address 2001:db8:1::1/64... done machine # [643544.613446] machine systemd[1]: Finished Address configuration of eth1. machine # [643544.647639] machine systemd[1]: Finished Extra networking commands.. machine # [643544.647828] machine systemd[1]: Reached target Network. machine # [643544.648825] machine systemd[1]: Started Fake GitHub API for github-agent-authd test. machine # [643544.809144] machine nsncd[233]: Nov 22 18:59:55.639 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket" machine # [643544.809240] machine systemd[1]: Started Name Service Cache Daemon (nsncd). machine # [643544.809296] machine systemd[1]: Reached target Host and Network Name Lookups. machine # [643544.809354] machine systemd[1]: Reached target User and Group Name Lookups. machine # [643544.810450] machine systemd[1]: Starting User Login Management... machine # [643544.811296] machine systemd[1]: Starting Permit User Sessions... machine # [643544.830348] machine systemd[1]: Finished Permit User Sessions. machine # [643544.831634] machine systemd[1]: Started Console Getty. machine # [643544.831686] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0 machine # [643544.831720] machine systemd[1]: Reached target Login Prompts. machine # [643546.544547] machine systemd-logind[311]: New seat seat0. machine # [643546.545227] machine systemd[1]: Starting D-Bus System Message Bus... machine # [643546.545594] machine systemd[1]: Started User Login Management. machine # [643546.548906] machine systemd[1]: Starting linger-users.service... machine # [643546.607456] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [643546.607519] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [643546.607549] machine systemd[1]: linger-users.service: Deactivated successfully. machine # [643546.607769] machine systemd[1]: Finished linger-users.service. machine # [643546.608595] machine systemd[1]: Reached target Multi-User System. machine # [643547.048725] machine dbus-broker-launch[321]: Looking up NSS user entry for 'systemd-timesync'... machine # [643547.051016] machine dbus-broker-launch[321]: NSS returned no entry for 'systemd-timesync' machine # [643547.051254] machine dbus-broker-launch[321]: Invalid user-name in /nix/store/cj7ihjraaw8n50y8sm8skl9gsn8vkby7-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync" machine # [643547.054276] machine systemd[1]: Started D-Bus System Message Bus. machine # [643547.056068] machine systemd[1]: Startup finished in 4.273s. machine # [643547.075527] machine dbus-broker-launch[321]: Ready [5.21s] machine: (finished: waiting for unit multi-user.target, in 5.18 seconds) [5.21s] machine: waiting for unit fake-github-api.service [5.24s] machine: (finished: waiting for unit fake-github-api.service, in 0.04 seconds) [5.24s] machine: waiting for unit github-agent-authd.socket [5.28s] machine: (finished: waiting for unit github-agent-authd.socket, in 0.03 seconds) [5.28s] machine: waiting for file '/run/github-agent-authd/socket' [5.29s] machine: (finished: waiting for file '/run/github-agent-authd/socket', in 0.02 seconds) [5.29s] machine: must fail: systemctl is-active github-agent-authd.service [5.32s] machine: (finished: must fail: systemctl is-active github-agent-authd.service, in 0.03 seconds) Test 1: socket access denied for non-member user... [5.32s] machine: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz curl: (7) Failed to connect to localhost:80 over unix:///run/github-agent-authd/socket after 0 ms: Could not connect to server [5.37s] machine: (finished: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 0.05 seconds) ✓ Test 1 passed Test 2: health check via authorized user... [5.37s] machine: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz machine # [643547.568512] machine runuser[331]: pam_unix(runuser:session): session opened for user blocked(uid=1000) by (uid=0) machine # [643547.594087] machine runuser[331]: pam_unix(runuser:session): session closed for user blocked machine # [643547.620901] machine runuser[333]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643547.642265] machine systemd[1]: Reached target Network is Online. machine # [643547.645929] machine systemd[1]: Starting GitHub agent auth broker... [7.58s] machine: (finished: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 2.21 seconds) [7.58s] machine: waiting for unit github-agent-authd.service [7.60s] machine: (finished: waiting for unit github-agent-authd.service, in 0.02 seconds) ✓ Test 2 passed Test 3: token retrieval and cache reuse... [7.60s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo [7.64s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.04 seconds) [7.64s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo [7.67s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds) [7.67s] machine: must succeed: cat /tmp/fake-gh-install-repo [7.68s] machine: (finished: must succeed: cat /tmp/fake-gh-install-repo, in 0.01 seconds) [7.68s] machine: must succeed: cat /tmp/fake-gh-token-mints [7.69s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds) ✓ Test 3 passed Test 4: git credential helper returns app credentials... [7.69s] machine: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/repo.git\n\n' | github-agent-git-credential-helper get" [7.74s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/repo.git\n\n' | github-agent-git-credential-helper get", in 0.05 seconds) ✓ Test 4 passed Test 5: github-agent-gh injects token and execs gh... [7.74s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp && mkdir gh-test && cd gh-test && git init -q && git remote add origin https://github.com/test/repo.git' [7.77s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp && mkdir gh-test && cd gh-test && git init -q && git remote add origin https://github.com/test/repo.git', in 0.02 seconds) [7.77s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null' machine # [643549.801530] machine systemd[1]: Started GitHub agent auth broker. machine # [643549.803212] machine github-agent-authd[335]: github-agent-authd: ready idle_shutdown_timeout=30m0s machine # [643549.805288] machine runuser[333]: pam_unix(runuser:session): session closed for user testuser machine # [643549.835892] machine runuser[341]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643549.859771] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=miss latency_ms=8 machine # [643549.868809] machine runuser[341]: pam_unix(runuser:session): session closed for user testuser machine # [643549.879621] machine runuser[348]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643549.894183] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 machine # [643549.900594] machine runuser[348]: pam_unix(runuser:session): session closed for user testuser machine # [643549.927635] machine runuser[355]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643549.958269] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 machine # [643549.966924] machine runuser[355]: pam_unix(runuser:session): session closed for user testuser machine # [643549.977655] machine runuser[365]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643549.991317] machine runuser[365]: pam_unix(runuser:session): session closed for user testuser machine # [643550.009380] machine runuser[369]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643550.043774] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 [7.95s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null', in 0.18 seconds) [7.95s] machine: must succeed: cat /tmp/fake-gh-token-mints [7.96s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds) ✓ Test 5 passed Test 6: helper cleanly misses unknown repo for git fallback... [7.96s] machine: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/missing.git\n\n' | github-agent-git-credential-helper get" [8.06s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "printf 'protocol=https\nhost=github.com\npath=test/missing.git\n\n' | github-agent-git-credential-helper get", in 0.10 seconds) ✓ Test 6 passed Test 7: missing repo uses negative cache... [8.06s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?" [8.14s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.08 seconds) [8.14s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?" machine # [643550.170516] machine runuser[369]: pam_unix(runuser:session): session closed for user testuser machine # [643550.206975] machine runuser[393]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643550.252824] machine github-agent-authd[335]: repo=test/missing latency_ms=4 kind=unknown_installation err="unknown repo/installation: test/missing" machine # [643550.284737] machine runuser[393]: pam_unix(runuser:session): session closed for user testuser machine # [643550.308108] machine runuser[406]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643550.341766] machine github-agent-authd[335]: repo=test/missing latency_ms=0 kind=unknown_installation err="unknown repo/installation: test/missing" machine # [643550.363675] machine runuser[406]: pam_unix(runuser:session): session closed for user testuser machine # [643550.384121] machine runuser[414]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [643550.419205] machine github-agent-authd[335]: repo=test/missing latency_ms=0 kind=unknown_installation err="unknown repo/installation: test/missing" machine # [643550.442993] machine runuser[414]: pam_unix(runuser:session): session closed for user testuser [8.22s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.08 seconds) [8.22s] machine: must succeed: cat /tmp/fake-gh-install-missing [8.24s] machine: (finished: must succeed: cat /tmp/fake-gh-install-missing, in 0.02 seconds) ✓ Test 7 passed ✅ All tests passed! [8.24s] (finished: run the VM test script, in 8.22 seconds) [8.26s] test script finished in 8.24s [8.26s] cleanup [8.26s] kill NspawnMachine (pid 50) Container machine terminated by signal KILL. [8.38s] (finished: cleanup, in 0.12 seconds)