[0.00s] Machine state will be reset. To keep it, pass --keep-machine-state [0.00s] start all VLans [0.01s] (finished: start all VLans, in 0.00 seconds) Initializing machine ID from random generator. [0.08s] Test will time out and terminate in 300.0 seconds [0.08s] 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.08s] machine: systemd-nspawn running (pid 50) [0.08s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal... [0.08s] 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 # [769868.902399] machine systemd-journald[58]: Journal started machine # [769868.902477] machine systemd-journald[58]: Runtime Journal (/run/log/journal/edb98268ce6444268f63bb8b799ff874) is 8M, max 1.2G, 1.2G free. machine # [769868.933688] machine systemd[1]: Listening on Journal Log Access Socket. machine # [769868.934174] machine systemd[1]: Finished Apply Kernel Variables. machine # [769868.962273] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully. machine # [769868.988638] machine systemd[1]: Starting Flush Journal to Persistent Storage... machine # [769869.001207] machine systemd[1]: Starting Create Static Device Nodes in /dev... machine # [769869.010095] machine systemd-journald[58]: Time spent on flushing to /var/log/journal/edb98268ce6444268f63bb8b799ff874 is 5.205ms for 7 entries. machine # [769869.010095] machine systemd-journald[58]: System Journal (/var/log/journal/edb98268ce6444268f63bb8b799ff874) is 8M, max 4G, 3.9G free. machine # [769869.038245] machine systemd[1]: Finished Flush Journal to Persistent Storage. machine # [769869.038761] machine systemd[1]: Finished Create Static Device Nodes in /dev. machine # [769869.039980] machine systemd[1]: Reached target Preparation for Local File Systems. machine # [769869.040499] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys machine # [769869.180451] machine systemd[1]: Finished Firewall. machine # [769869.903297] machine systemd[1]: Mounting /run/wrappers... machine # [769869.944540] machine systemd[1]: Mounted /run/wrappers. machine # [769869.945285] machine systemd[1]: Reached target Local File Systems. machine # [769869.946333] machine systemd[1]: Listening on Boot Loader Control Service Socket. machine # [769869.954604] machine systemd[1]: Starting Create SUID/SGID Wrappers... machine # [769869.954749] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container machine # [769869.957429] machine systemd[1]: Starting Save Transient machine-id to Disk... machine # [769869.959146] machine systemd[1]: Starting Create System Files and Directories... machine # [769869.987591] machine systemd-tmpfiles[164]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted machine # [769869.987861] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal failed: Operation not permitted machine # [769869.988043] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal/edb98268ce6444268f63bb8b799ff874 failed: Operation not permitted machine # [769869.988354] machine systemd-tmpfiles[164]: fchmod() of /run/log/journal failed: Operation not permitted machine # [769869.997287] machine systemd[1]: Finished Create System Files and Directories. machine # [769870.005797] machine suid-sgid-wrappers-start[171]: chmod: changing permissions of '/run/wrappers/wrappers.jrQhh9Zh6k/chsh': Operation not permitted machine # [769870.027964] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE machine # [769870.028166] 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 # [769870.028311] 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 # [769870.028417] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'. machine # [769870.028687] machine systemd[1]: Failed to start Create SUID/SGID Wrappers. machine # [769870.032141] machine systemd[1]: Starting Rebuild Journal Catalog... machine # [769870.034497] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP... machine # [769870.073708] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP. machine # [769870.085044] machine systemd[1]: Finished Rebuild Journal Catalog. machine # [769870.088476] machine systemd[1]: Starting Update is Completed... machine # [769870.111331] machine systemd[1]: Finished Update is Completed. machine # [769870.111672] machine systemd[1]: Reached target System Initialization. machine # [769870.111836] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container machine # [769870.111926] machine systemd[1]: Started Daily Cleanup of Temporary Directories. machine # [769870.111999] machine systemd[1]: Reached target Timer Units. machine # [769870.115320] machine systemd[1]: Listening on D-Bus System Message Bus Socket. machine # [769870.116518] machine systemd[1]: Starting GitHub agent auth broker socket... machine # [769870.116827] machine systemd[1]: Listening on Nix Daemon Socket. machine # [769870.119251] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export). machine # [769870.120365] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local). machine # [769870.121792] machine systemd[1]: Listening on SSH Socket. machine # [769870.122127] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket. machine # [769870.128161] machine systemd[1]: Listening on GitHub agent auth broker socket. machine # [769870.128253] machine systemd[1]: Reached target Socket Units. machine # [769870.128318] machine systemd[1]: Reached target Basic System. machine # [769870.131622] machine systemd[1]: Starting Import lastlog data into lastlog2 database... machine # [769870.136559] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [769870.140062] machine systemd[1]: Starting resolvconf update... machine # [769870.140228] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met. machine # [769870.177075] machine systemd[1]: Finished Import lastlog data into lastlog2 database. machine # [769870.256567] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available machine # [769870.256743] machine systemd[1]: nscd.service: Deactivated successfully. machine # [769870.264960] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd). machine # [769870.272486] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [769870.276353] machine resolvconf-start[238]: setfacl: /run/resolvconf: Operation not supported machine # [769870.281435] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE machine # [769870.281509] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [769870.281582] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [769870.281622] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'. machine # [769870.281805] machine systemd[1]: Failed to start resolvconf update. machine # [769870.282448] machine systemd[1]: Reached target Preparation for Network. machine # [769870.287429] machine systemd[1]: Starting Address configuration of eth1... machine # [769870.294034] machine systemd[1]: Starting Extra networking commands.... machine # [769870.320832] machine network-addresses-eth1-start[241]: adding address 192.168.1.1/24... done machine # [769870.330836] machine network-addresses-eth1-start[241]: adding address 2001:db8:1::1/64... done machine # [769870.334657] machine systemd[1]: Finished Address configuration of eth1. machine # [769870.402392] machine systemd[1]: Finished Extra networking commands.. machine # [769870.402552] machine systemd[1]: Reached target Network. machine # [769870.404119] machine systemd[1]: Started Fake GitHub API for github-agent-authd test. machine # [769870.559346] machine systemd[1]: Started Name Service Cache Daemon (nsncd). machine # [769870.559429] machine systemd[1]: Reached target Host and Network Name Lookups. machine # [769870.559495] machine systemd[1]: Reached target User and Group Name Lookups. machine # [769870.560233] machine nsncd[237]: Nov 09 03:41:42.371 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket" machine # [769870.562664] machine systemd[1]: Starting User Login Management... machine # [769870.566301] machine systemd[1]: Starting Permit User Sessions... machine # [769870.590165] machine systemd[1]: Finished Permit User Sessions. machine # [769870.594558] machine systemd[1]: Started Console Getty. machine # [769870.594617] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0 machine # [769870.594640] machine systemd[1]: Reached target Login Prompts. machine # [769871.441558] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully. machine # [769871.443319] machine systemd[1]: Finished Save Transient machine-id to Disk. machine # [769872.613435] machine systemd-logind[303]: New seat seat0. machine # [769872.621280] machine systemd[1]: Starting D-Bus System Message Bus... machine # [769872.622683] machine systemd[1]: Started User Login Management. machine # [769872.624634] machine systemd[1]: Starting linger-users.service... machine # [769872.646283] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [769872.646349] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [769872.646390] machine systemd[1]: linger-users.service: Deactivated successfully. machine # [769872.646815] machine systemd[1]: Finished linger-users.service. machine # [769872.647170] machine systemd[1]: Reached target Multi-User System. [5.78s] machine: (finished: waiting for unit multi-user.target, in 5.70 seconds) [5.78s] machine: waiting for unit fake-github-api.service [5.82s] machine: (finished: waiting for unit fake-github-api.service, in 0.04 seconds) [5.82s] machine: waiting for unit github-agent-authd.socket [5.86s] machine: (finished: waiting for unit github-agent-authd.socket, in 0.04 seconds) [5.86s] machine: waiting for file '/run/github-agent-authd/socket' [5.87s] machine: (finished: waiting for file '/run/github-agent-authd/socket', in 0.01 seconds) [5.87s] machine: must fail: systemctl is-active github-agent-authd.service [5.89s] machine: (finished: must fail: systemctl is-active github-agent-authd.service, in 0.02 seconds) Test 1: socket access denied for non-member user... [5.89s] machine: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz machine # [769873.301605] machine dbus-broker-launch[321]: Looking up NSS user entry for 'systemd-timesync'... machine # [769873.306984] machine dbus-broker-launch[321]: NSS returned no entry for 'systemd-timesync' machine # [769873.307173] machine dbus-broker-launch[321]: Invalid user-name in /nix/store/hsm2jhqrj2lkzr7dnjqqgbr4g850vjkr-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync" machine # [769873.310166] machine systemd[1]: Started D-Bus System Message Bus. machine # [769873.310728] machine systemd[1]: Startup finished in 4.944s. machine # [769873.332019] machine dbus-broker-launch[321]: Ready machine # [769873.580724] machine runuser[331]: pam_unix(runuser:session): session opened for user blocked(uid=1000) by (uid=0) curl: (7) Failed to connect to localhost:80 over unix:///run/github-agent-authd/socket after 0 ms: Could not connect to server [5.93s] machine: (finished: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 0.04 seconds) ✓ Test 1 passed Test 2: health check via authorized user... [5.93s] machine: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz machine # [769873.602751] machine runuser[331]: pam_unix(runuser:session): session closed for user blocked machine # [769873.616037] machine runuser[333]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769873.632849] machine systemd[1]: Reached target Network is Online. machine # [769873.649347] machine systemd[1]: Starting GitHub agent auth broker... [7.66s] machine: (finished: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 1.73 seconds) [7.66s] machine: waiting for unit github-agent-authd.service [7.68s] machine: (finished: waiting for unit github-agent-authd.service, in 0.02 seconds) ✓ Test 2 passed Test 3: token retrieval and cache reuse... [7.68s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo [7.71s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.04 seconds) [7.71s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo [7.75s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.04 seconds) [7.75s] machine: must succeed: cat /tmp/fake-gh-install-repo [7.76s] machine: (finished: must succeed: cat /tmp/fake-gh-install-repo, in 0.01 seconds) [7.76s] machine: must succeed: cat /tmp/fake-gh-token-mints [7.77s] 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.77s] 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.82s] 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.82s] 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.85s] 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.03 seconds) [7.85s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null' machine # [769875.329581] machine systemd[1]: Started GitHub agent auth broker. machine # [769875.332211] machine github-agent-authd[335]: github-agent-authd: ready idle_shutdown_timeout=30m0s machine # [769875.333728] machine runuser[333]: pam_unix(runuser:session): session closed for user testuser machine # [769875.365505] machine runuser[341]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.385290] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=miss latency_ms=6 machine # [769875.391021] machine runuser[341]: pam_unix(runuser:session): session closed for user testuser machine # [769875.400679] machine runuser[348]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.417795] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 machine # [769875.423966] machine runuser[348]: pam_unix(runuser:session): session closed for user testuser machine # [769875.457576] machine runuser[355]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.487017] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 machine # [769875.492063] machine runuser[355]: pam_unix(runuser:session): session closed for user testuser machine # [769875.507547] machine runuser[365]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.522383] machine runuser[365]: pam_unix(runuser:session): session closed for user testuser machine # [769875.529487] machine runuser[369]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.560728] 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.10 seconds) [7.95s] machine: must succeed: cat /tmp/fake-gh-token-mints [7.95s] 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.95s] 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.00s] 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.04 seconds) ✓ Test 6 passed Test 7: missing repo uses negative cache... [8.00s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?" [8.03s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.04 seconds) [8.03s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?" [8.07s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.04 seconds) [8.07s] machine: must succeed: cat /tmp/fake-gh-install-missing [8.08s] machine: (finished: must succeed: cat /tmp/fake-gh-install-missing, in 0.01 seconds) ✓ Test 7 passed ✅ All tests passed! [8.08s] (finished: run the VM test script, in 8.00 seconds) machine # [769875.621163] machine runuser[369]: pam_unix(runuser:session): session closed for user testuser machine # [769875.638714] machine runuser[393]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.662086] machine github-agent-authd[335]: repo=test/missing latency_ms=2 kind=unknown_installation err="unknown repo/installation: test/missing" machine # [769875.672970] machine runuser[393]: pam_unix(runuser:session): session closed for user testuser machine # [769875.682098] machine runuser[407]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.700861] machine github-agent-authd[335]: repo=test/missing latency_ms=0 kind=unknown_installation err="unknown repo/installation: test/missing" machine # [769875.710958] machine runuser[407]: pam_unix(runuser:session): session closed for user testuser machine # [769875.719698] machine runuser[415]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [769875.737092] machine github-agent-authd[335]: repo=test/missing latency_ms=0 kind=unknown_installation err="unknown repo/installation: test/missing" machine # [769875.747187] machine runuser[415]: pam_unix(runuser:session): session closed for user testuser [8.99s] test script finished in 8.91s [8.99s] cleanup [8.99s] kill NspawnMachine (pid 50) Container machine terminated by signal KILL. [9.11s] (finished: cleanup, in 0.12 seconds)