Machine state will be reset. To keep it, pass --keep-machine-state start all VLans (finished: start all VLans, in 0.00 seconds) Initializing machine ID from random generator. Test will time out and terminate in 120.0 seconds 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 machine: systemd-nspawn running (pid 50) machine: Waiting for journal at /build/vm-state-machine/var/log/journal... 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 # [86888.298102] machine systemd-journald[71]: Journal started machine # [86888.298146] machine systemd-journald[71]: Runtime Journal (/run/log/journal/d25e588305d64f73a3a1cda4cda04963) is 8M, max 1.2G, 1.2G free. machine # [86888.311685] machine systemd[1]: Listening on Journal Log Access Socket. machine # [86888.311912] machine systemd[1]: Finished Apply Kernel Variables. machine # [86888.321650] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully. machine # [86888.332440] machine systemd[1]: Starting Flush Journal to Persistent Storage... machine # [86888.332869] machine systemd[1]: Starting Create Static Device Nodes in /dev... machine # [86888.345801] machine systemd-journald[71]: Time spent on flushing to /var/log/journal/d25e588305d64f73a3a1cda4cda04963 is 1.204ms for 7 entries. machine # [86888.345801] machine systemd-journald[71]: System Journal (/var/log/journal/d25e588305d64f73a3a1cda4cda04963) is 8M, max 4G, 3.9G free. machine # [86888.355444] machine systemd[1]: Finished Flush Journal to Persistent Storage. machine # [86888.355712] machine systemd[1]: Finished Create Static Device Nodes in /dev. machine # [86888.356332] machine systemd[1]: Reached target Preparation for Local File Systems. machine # [86888.356428] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys machine # [86888.389921] machine systemd[1]: Finished Firewall. machine # [86889.300834] machine systemd[1]: Mounting /run/wrappers... machine # [86889.334819] machine systemd[1]: Mounted /run/wrappers. machine # [86889.335430] machine systemd[1]: Reached target Local File Systems. machine # [86889.336316] machine systemd[1]: Listening on Boot Loader Control Service Socket. machine # [86889.337047] machine systemd[1]: Starting Create SUID/SGID Wrappers... machine # [86889.337086] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container machine # [86889.337727] machine systemd[1]: Starting Save Transient machine-id to Disk... machine # [86889.338355] machine systemd[1]: Starting Create System Files and Directories... machine # [86889.359441] machine suid-sgid-wrappers-start[184]: chmod: changing permissions of '/run/wrappers/wrappers.LkIXdLPoi5/chsh': Operation not permitted machine # [86889.364914] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE machine # [86889.364970] 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 # [86889.365036] 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 # [86889.365067] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'. machine # [86889.365213] machine systemd[1]: Failed to start Create SUID/SGID Wrappers. machine # [86889.365826] machine systemd-tmpfiles[177]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted machine # [86889.366047] machine systemd-tmpfiles[177]: fchmod() of /var/log/journal failed: Operation not permitted machine # [86889.366211] machine systemd-tmpfiles[177]: fchmod() of /var/log/journal/d25e588305d64f73a3a1cda4cda04963 failed: Operation not permitted machine # [86889.366432] machine systemd-tmpfiles[177]: fchmod() of /run/log/journal failed: Operation not permitted machine # [86889.367551] machine systemd[1]: Finished Create System Files and Directories. machine # [86889.387980] machine systemd[1]: Starting Rebuild Journal Catalog... machine # [86889.388598] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP... machine # [86889.412048] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully. machine # [86889.413206] machine systemd[1]: Finished Save Transient machine-id to Disk. machine # [86889.417105] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP. machine # [86889.421344] machine systemd[1]: Finished Rebuild Journal Catalog. machine # [86889.422328] machine systemd[1]: Starting Update is Completed... machine # [86889.440689] machine systemd[1]: Finished Update is Completed. machine # [86889.441095] machine systemd[1]: Reached target System Initialization. machine # [86889.441220] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container machine # [86889.441260] machine systemd[1]: Started Daily Cleanup of Temporary Directories. machine # [86889.441289] machine systemd[1]: Reached target Timer Units. machine # [86889.441398] machine systemd[1]: Listening on D-Bus System Message Bus Socket. machine # [86889.441519] machine systemd[1]: Listening on Nix Daemon Socket. machine # [86889.442548] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export). machine # [86889.443552] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local). machine # [86889.444202] machine systemd[1]: Listening on SSH Socket. machine # [86889.444326] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket. machine # [86889.444352] machine systemd[1]: Reached target Socket Units. machine # [86889.444407] machine systemd[1]: Reached target Basic System. machine # [86889.445428] machine systemd[1]: Starting Import lastlog data into lastlog2 database... machine # [86889.446168] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [86889.446755] machine systemd[1]: Starting resolvconf update... machine # [86889.446776] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met. machine # [86889.468571] machine systemd[1]: Finished Import lastlog data into lastlog2 database. machine # [86889.490504] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available machine # [86889.490536] machine systemd[1]: nscd.service: Deactivated successfully. machine # [86889.490686] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd). machine # [86889.492608] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)... machine # [86889.499504] machine resolvconf-start[251]: setfacl: /run/resolvconf: Operation not supported machine # [86889.500285] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE machine # [86889.500345] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [86889.500395] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available machine # [86889.500424] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'. machine # [86889.507137] machine systemd[1]: Failed to start resolvconf update. machine # [86889.507408] machine systemd[1]: Reached target Preparation for Network. machine # [86889.508191] machine systemd[1]: Starting Address configuration of eth1... machine # [86889.508960] machine systemd[1]: Starting Extra networking commands.... machine # [86889.521860] machine network-addresses-eth1-start[254]: adding address 192.168.1.1/24... done machine # [86889.524110] machine network-addresses-eth1-start[254]: adding address 2001:db8:1::1/64... done machine # [86889.527663] machine systemd[1]: Finished Address configuration of eth1. machine # [86889.553937] machine systemd[1]: Finished Extra networking commands.. machine # [86889.554116] machine systemd[1]: Reached target Network. machine # [86889.554185] machine systemd[1]: Reached target Network is Online. machine # [86889.555130] machine systemd[1]: Starting GitHub webhook listener... machine # [86889.664397] machine nsncd[243]: Nov 01 05:58:41.476 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket" machine # [86889.664421] machine systemd[1]: Started Name Service Cache Daemon (nsncd). machine # [86889.664482] machine systemd[1]: Reached target Host and Network Name Lookups. machine # [86889.664537] machine systemd[1]: Reached target User and Group Name Lookups. machine # [86889.665488] machine systemd[1]: Starting User Login Management... machine # [86889.666066] machine systemd[1]: Starting Permit User Sessions... machine # [86889.682327] machine systemd[1]: Finished Permit User Sessions. machine # [86889.683316] machine systemd[1]: Started Console Getty. machine # [86889.683352] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0 machine # [86889.683371] machine systemd[1]: Reached target Login Prompts. machine # [86890.525143] machine systemd[1]: Started GitHub webhook listener. machine # [86890.526553] machine github-webhook[312]: [test/repo1] running startup command machine # [86890.531732] machine github-webhook[312]: [test/repo1] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result machine # [86890.531732] machine github-webhook[312]: listening on :8673 machine # [86890.692644] machine systemd-logind[324]: New seat seat0. machine # [86890.693431] machine systemd[1]: Starting D-Bus System Message Bus... machine # [86890.693688] machine systemd[1]: Started User Login Management. machine # [86890.694401] machine systemd[1]: Starting linger-users.service... machine # [86890.710844] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [86890.710891] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available machine # [86890.710928] machine systemd[1]: linger-users.service: Deactivated successfully. machine # [86890.711100] machine systemd[1]: Finished linger-users.service. machine # [86890.711299] machine systemd[1]: Reached target Multi-User System. machine # [86891.027928] machine dbus-broker-launch[341]: Looking up NSS user entry for 'systemd-timesync'... machine # [86891.028465] machine dbus-broker-launch[341]: NSS returned no entry for 'systemd-timesync' machine # [86891.028465] machine dbus-broker-launch[341]: Invalid user-name in /nix/store/wqx5h6pixyrpvjw50l3y7japa3fm1mry-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync" machine # [86891.028979] machine systemd[1]: Started D-Bus System Message Bus. machine # [86891.029215] machine systemd[1]: Startup finished in 2.978s. machine # [86891.037501] machine dbus-broker-launch[341]: Ready machine: (finished: waiting for unit multi-user.target, in 3.65 seconds) machine: waiting for unit github-webhook.service machine: (finished: waiting for unit github-webhook.service, in 0.01 seconds) machine: waiting for TCP port 8673 on localhost Connection to localhost (::1) 8673 port [tcp/*] succeeded! machine: (finished: waiting for TCP port 8673 on localhost, in 0.01 seconds) Test 1: Health check... machine: must succeed: curl -f http://localhost:8673/healthz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3 100 3 0 0 3618 0 0 machine: (finished: must succeed: curl -f http://localhost:8673/healthz, in 0.01 seconds) ✓ Test 1 passed: Health check OK Test 2: Check runOnStartup... machine: waiting for file '/tmp/repo1-result' machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds) machine: must succeed: cat /tmp/repo1-result machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds) ✓ Test 2 passed: runOnStartup executed Test 3: Send push webhook for repo1... machine: must succeed: rm -f /tmp/repo1-result machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds) machine: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=15259c7e93fe5c1d76310f128b047ec8bc59d7854155b88d66022a28075fc5e6' -d '{"ref": "refs/heads/main", "after": "abc123def456", "repository": {"full_name": "test/repo1"}, "sender": {"login": "testuser"}}' -w '%{http_code}' -o /dev/null -s machine: (finished: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=15259c7e93fe5c1d76310f128b047ec8bc59d7854155b88d66022a28075fc5e6' -d '{"ref": "refs/heads/main", "after": "abc123def456", "repository": {"full_name": "test/repo1"}, "sender": {"login": "testuser"}}' -w '%{http_code}' -o /dev/null -s , in 0.01 seconds) machine # [86891.538752] machine github-webhook[312]: [test/repo1] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result machine: waiting for file '/tmp/repo1-result' machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds) machine: must succeed: cat /tmp/repo1-result machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds) ✓ Test 3 passed: Push webhook triggered repo1 Test 4: Send push webhook for repo2 with env context... machine: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=4b70297f69ca1f9483bd977193e89ef3a0fff4834a0501e8e76347fce9e2da19' -d '{"ref": "refs/heads/master", "after": "def456abc789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "alice"}}' -w '%{http_code}' -o /dev/null -s machine: (finished: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=4b70297f69ca1f9483bd977193e89ef3a0fff4834a0501e8e76347fce9e2da19' -d '{"ref": "refs/heads/master", "after": "def456abc789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "alice"}}' -w '%{http_code}' -o /dev/null -s , in 0.01 seconds) machine # [86892.567916] machine github-webhook[312]: [test/repo2] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo "repo2 triggered on $GH_BRANCH" > /tmp/repo2-result machine: waiting for file '/tmp/repo2-result' machine: (finished: waiting for file '/tmp/repo2-result', in 0.01 seconds) machine: must succeed: cat /tmp/repo2-result machine: (finished: must succeed: cat /tmp/repo2-result, in 0.01 seconds) ✓ Test 4 passed: Push webhook triggered repo2 with environment context Test 5: Reject webhook for untracked branch... machine: must succeed: rm -f /tmp/repo2-result machine: (finished: must succeed: rm -f /tmp/repo2-result, in 0.01 seconds) machine: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=d485bc2ab9974e10150aaa7ae6e38e372c6711fbbe15baf0ea82388d39cf3043' -d '{"ref": "refs/heads/feature", "after": "xyz789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "bob"}}' -w '%{http_code}' -o /dev/null -s machine: (finished: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=d485bc2ab9974e10150aaa7ae6e38e372c6711fbbe15baf0ea82388d39cf3043' -d '{"ref": "refs/heads/feature", "after": "xyz789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "bob"}}' -w '%{http_code}' -o /dev/null -s , in 0.02 seconds) machine: must fail: test -f /tmp/repo2-result machine: (finished: must fail: test -f /tmp/repo2-result, in 0.01 seconds) ✓ Test 5 passed: Rejected webhook for untracked branch Test 6: Reject webhook with invalid signature... machine: must succeed: rm -f /tmp/repo1-result machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds) machine: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbaad' -d '{"ref": "refs/heads/main", "repository": {"full_name": "test/repo1"}, "sender": {"login": "eve"}}' -w '%{http_code}' -o /dev/null -s machine: (finished: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbaad' -d '{"ref": "refs/heads/main", "repository": {"full_name": "test/repo1"}, "sender": {"login": "eve"}}' -w '%{http_code}' -o /dev/null -s , in 0.01 seconds) machine: must fail: test -f /tmp/repo1-result machine: (finished: must fail: test -f /tmp/repo1-result, in 0.01 seconds) ✓ Test 6 passed: Rejected webhook with invalid signature Test 7: Accept ping event... machine: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: ping' -H 'X-Hub-Signature-256: sha256=e53e1ee61790d8aa29e96127e3603888d6f33217219cb5200987f99b1d7b5a3f' -d '{"zen": "Keep it simple.", "repository": {"full_name": "test/repo1"}}' -w '%{http_code}' -o /dev/null -s machine: (finished: must succeed: curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: ping' -H 'X-Hub-Signature-256: sha256=e53e1ee61790d8aa29e96127e3603888d6f33217219cb5200987f99b1d7b5a3f' -d '{"zen": "Keep it simple.", "repository": {"full_name": "test/repo1"}}' -w '%{http_code}' -o /dev/null -s , in 0.01 seconds) ✓ Test 7 passed: Ping event accepted ✅ All tests passed! (finished: run the VM test script, in 7.85 seconds) test script finished in 7.87s cleanup kill NspawnMachine (pid 50) Container machine terminated by signal KILL. (finished: cleanup, in 0.06 seconds)