[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.02s] machine: systemd-nspawn running (pid 50) [0.02s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal... [0.02s] 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 # [ 2586.959281] machine systemd-journald[58]: Journal started machine # [ 2586.959351] machine systemd-journald[58]: Runtime Journal (/run/log/journal/201bd2dbb455446f8ecd2b3e0dad182a) is 8M, max 1.2G, 1.2G free. machine # [ 2586.979849] machine systemd[1]: Finished Apply Kernel Variables. machine # [ 2586.999968] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully. machine # [ 2587.021939] machine systemd[1]: Starting Flush Journal to Persistent Storage... machine # [ 2587.022586] machine systemd[1]: Starting Create Static Device Nodes in /dev... machine # [ 2587.038447] machine systemd-journald[58]: Time spent on flushing to /var/log/journal/201bd2dbb455446f8ecd2b3e0dad182a is 1.401ms for 6 entries. machine # [ 2587.038447] machine systemd-journald[58]: System Journal (/var/log/journal/201bd2dbb455446f8ecd2b3e0dad182a) is 8M, max 4G, 3.9G free. machine # [ 2587.055332] machine systemd[1]: Finished Flush Journal to Persistent Storage. machine # [ 2587.055649] machine systemd[1]: Finished Create Static Device Nodes in /dev. machine # [ 2587.056576] machine systemd[1]: Reached target Preparation for Local File Systems. machine # [ 2587.056759] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys machine # [ 2587.097708] machine systemd[1]: Finished Firewall. machine # [ 2587.963391] machine systemd[1]: Mounting /run/wrappers... machine # [ 2588.008146] machine systemd[1]: Mounted /run/wrappers. machine # [ 2588.008736] machine systemd[1]: Reached target Local File Systems. machine # [ 2588.009830] machine systemd[1]: Listening on Boot Loader Control Service Socket. machine # [ 2588.010766] machine systemd[1]: Starting Create SUID/SGID Wrappers... machine # [ 2588.010803] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container machine # [ 2588.011537] machine systemd[1]: Starting Save Transient machine-id to Disk... machine # [ 2588.012244] machine systemd[1]: Starting Create System Files and Directories... machine # [ 2588.037821] machine systemd-tmpfiles[164]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted machine # [ 2588.038518] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal failed: Operation not permitted machine # [ 2588.038712] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal/201bd2dbb455446f8ecd2b3e0dad182a failed: Operation not permitted machine # [ 2588.038999] machine systemd-tmpfiles[164]: fchmod() of /run/log/journal failed: Operation not permitted machine # [ 2588.045821] machine suid-sgid-wrappers-start[171]: chmod: changing permissions of '/run/wrappers/wrappers.DqQqdfsM1b/chsh': Operation not permitted machine # [ 2588.046194] machine systemd[1]: Finished Create System Files and Directories. machine # [ 2588.067555] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE machine # [ 2588.067618] 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 # [ 2588.067688] 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 # [ 2588.067726] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'. machine # [ 2588.068562] machine systemd[1]: Failed to start Create SUID/SGID Wrappers. machine # [ 2588.073941] machine systemd[1]: Starting Rebuild Journal Catalog... machine # [ 2588.076810] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP... machine # [ 2588.099485] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP. machine # [ 2588.119810] machine systemd[1]: Finished Rebuild Journal Catalog. machine # [ 2588.122729] machine systemd[1]: Starting Update is Completed... machine # [ 2588.169114] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully. machine # [ 2588.170953] machine systemd[1]: Finished Save Transient machine-id to Disk. machine # [ 2588.171298] machine systemd[1]: Finished Update is Completed. machine # [ 2588.172490] machine systemd[1]: Reached target System Initialization. machine # [ 2588.172602] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container machine # [ 2588.172649] machine systemd[1]: Started Daily Cleanup of Temporary Directories. machine # [ 2588.172697] machine systemd[1]: Reached target Timer Units. machine # [ 2588.172896] machine systemd[1]: Listening on D-Bus System Message Bus Socket. machine # [ 2588.174035] machine systemd[1]: Starting GitHub agent auth broker socket... machine # [ 2588.174282] machine systemd[1]: Listening on Nix Daemon Socket. machine # [ 2588.176488] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export). machine # [ 2588.178463] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local). machine # [ 2588.179810] machine systemd[1]: Listening on SSH Socket. machine # [ 2588.180108] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket. machine # [ 2588.181671] machine systemd[1]: Listening on GitHub agent auth broker socket. machine # [ 2588.181873] machine systemd[1]: Reached target Socket Units. machine # [ 2588.181946] machine systemd[1]: Reached target Basic System. machine # [ 2588.183612] machine systemd[1]: Starting Import lastlog data into lastlog2 database... machine # [ 2588.185646] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [ 2588.187271] machine systemd[1]: Starting resolvconf update... machine # [ 2588.187460] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met. machine # [ 2588.207722] machine systemd[1]: Finished Import lastlog data into lastlog2 database. machine # [ 2588.245649] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available machine # [ 2588.245688] machine systemd[1]: nscd.service: Deactivated successfully. machine # [ 2588.245852] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd). machine # [ 2588.248108] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [ 2588.262133] machine resolvconf-start[239]: setfacl: /run/resolvconf: Operation not supported machine # [ 2588.263208] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE machine # [ 2588.263278] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [ 2588.263341] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [ 2588.263380] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'. machine # [ 2588.263566] machine systemd[1]: Failed to start resolvconf update. machine # [ 2588.263878] machine systemd[1]: Reached target Preparation for Network. machine # [ 2588.265064] machine systemd[1]: Starting Address configuration of eth1... machine # [ 2588.266110] machine systemd[1]: Starting Extra networking commands.... machine # [ 2588.289230] machine network-addresses-eth1-start[242]: adding address 192.168.1.1/24... done machine # [ 2588.293366] machine network-addresses-eth1-start[242]: adding address 2001:db8:1::1/64... done machine # [ 2588.298189] machine systemd[1]: Finished Address configuration of eth1. machine # [ 2588.335972] machine systemd[1]: Finished Extra networking commands.. machine # [ 2588.336276] machine systemd[1]: Reached target Network. machine # [ 2588.337215] machine systemd[1]: Started Fake GitHub API for github-agent-authd test. machine # [ 2588.464474] machine nsncd[231]: Nov 15 08:11:50.394 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket" machine # [ 2588.464505] machine systemd[1]: Started Name Service Cache Daemon (nsncd). machine # [ 2588.464569] machine systemd[1]: Reached target Host and Network Name Lookups. machine # [ 2588.464625] machine systemd[1]: Reached target User and Group Name Lookups. machine # [ 2588.465692] machine systemd[1]: Starting User Login Management... machine # [ 2588.466442] machine systemd[1]: Starting Permit User Sessions... machine # [ 2588.484462] machine systemd[1]: Finished Permit User Sessions. machine # [ 2588.486173] machine systemd[1]: Started Console Getty. machine # [ 2588.486227] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0 machine # [ 2588.486253] machine systemd[1]: Reached target Login Prompts. machine # [ 2589.691072] machine systemd-logind[311]: New seat seat0. machine # [ 2589.691502] machine systemd[1]: Starting D-Bus System Message Bus... machine # [ 2589.691788] machine systemd[1]: Started User Login Management. machine # [ 2589.694013] machine systemd[1]: Starting linger-users.service... machine # [ 2589.714528] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [ 2589.714595] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [ 2589.714635] machine systemd[1]: linger-users.service: Deactivated successfully. machine # [ 2589.714803] machine systemd[1]: Finished linger-users.service. machine # [ 2589.715037] machine systemd[1]: Reached target Multi-User System. [4.17s] machine: (finished: waiting for unit multi-user.target, in 4.15 seconds) [4.17s] machine: waiting for unit fake-github-api.service [4.19s] machine: (finished: waiting for unit fake-github-api.service, in 0.02 seconds) [4.19s] machine: waiting for unit github-agent-authd.socket [4.21s] machine: (finished: waiting for unit github-agent-authd.socket, in 0.02 seconds) [4.21s] machine: waiting for file '/run/github-agent-authd/socket' [4.21s] machine: (finished: waiting for file '/run/github-agent-authd/socket', in 0.01 seconds) [4.21s] machine: must fail: systemctl is-active github-agent-authd.service [4.23s] machine: (finished: must fail: systemctl is-active github-agent-authd.service, in 0.02 seconds) Test 1: socket access denied for non-member user... [4.23s] 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 [4.26s] machine: (finished: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 0.03 seconds) ✓ Test 1 passed Test 2: health check via authorized user... [4.26s] machine: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz machine # [ 2590.118030] machine dbus-broker-launch[321]: Looking up NSS user entry for 'systemd-timesync'... machine # [ 2590.118533] machine dbus-broker-launch[321]: NSS returned no entry for 'systemd-timesync' machine # [ 2590.118533] 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 # [ 2590.119396] machine systemd[1]: Started D-Bus System Message Bus. machine # [ 2590.119756] machine systemd[1]: Startup finished in 3.631s. machine # [ 2590.129963] machine dbus-broker-launch[321]: Ready machine # [ 2590.278035] machine runuser[331]: pam_unix(runuser:session): session opened for user blocked(uid=1000) by (uid=0) machine # [ 2590.288806] machine runuser[331]: pam_unix(runuser:session): session closed for user blocked machine # [ 2590.300196] machine runuser[333]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [ 2590.308754] machine systemd[1]: Reached target Network is Online. machine # [ 2590.312105] machine systemd[1]: Starting GitHub agent auth broker... [5.75s] machine: (finished: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 1.49 seconds) [5.75s] machine: waiting for unit github-agent-authd.service [5.77s] machine: (finished: waiting for unit github-agent-authd.service, in 0.02 seconds) ✓ Test 2 passed Test 3: token retrieval and cache reuse... [5.77s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo [5.80s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds) [5.80s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo [5.83s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds) [5.83s] machine: must succeed: cat /tmp/fake-gh-install-repo [5.84s] machine: (finished: must succeed: cat /tmp/fake-gh-install-repo, in 0.01 seconds) [5.84s] machine: must succeed: cat /tmp/fake-gh-token-mints [5.85s] 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... [5.85s] 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" [5.88s] 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.04 seconds) ✓ Test 4 passed Test 5: github-agent-gh injects token and execs gh... [5.88s] 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' [5.91s] 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) [5.91s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null' machine # [ 2591.776544] machine systemd[1]: Started GitHub agent auth broker. machine # [ 2591.778648] machine github-agent-authd[335]: github-agent-authd: ready idle_shutdown_timeout=30m0s machine # [ 2591.779979] machine runuser[333]: pam_unix(runuser:session): session closed for user testuser machine # [ 2591.806227] machine runuser[341]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [ 2591.824029] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=miss latency_ms=5 machine # [ 2591.829625] machine runuser[341]: pam_unix(runuser:session): session closed for user testuser machine # [ 2591.840652] machine runuser[349]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [ 2591.852824] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 machine # [ 2591.857666] machine runuser[349]: pam_unix(runuser:session): session closed for user testuser machine # [ 2591.883771] machine runuser[356]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [ 2591.904498] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 machine # [ 2591.909318] machine runuser[356]: pam_unix(runuser:session): session closed for user testuser machine # [ 2591.916447] machine runuser[366]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [ 2591.931869] machine runuser[366]: pam_unix(runuser:session): session closed for user testuser machine # [ 2591.939560] machine runuser[370]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0) machine # [ 2591.968418] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0 [6.02s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null', in 0.11 seconds) machine # [ 2592.041174] machine runuser[370]: pam_unix(runuser:session): session closed for user testuser [6.02s] machine: must succeed: cat /tmp/fake-gh-token-mints [6.03s] 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... [6.03s] 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" [6.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.03 seconds) ✓ Test 6 passed Test 7: missing repo uses negative cache... [6.06s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?" [6.09s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.03 seconds) [6.09s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?" [6.11s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.03 seconds) [6.11s] machine: must succeed: cat /tmp/fake-gh-install-missing [6.12s] machine: (finished: must succeed: cat /tmp/fake-gh-install-missing, in 0.01 seconds) ✓ Test 7 passed ✅ All tests passed! [6.12s] (finished: run the VM test script, in 6.10 seconds) [6.14s] test script finished in 6.12s [6.14s] cleanup [6.14s] kill NspawnMachine (pid 50) Container machine terminated by signal KILL. [6.20s] (finished: cleanup, in 0.06 seconds)