container-test-run-github-agent-authd
checks.x86_64-linux.nixosTests.github-agent-authd.x86_64-linux
· build #187
· raw
1[0.00s] Machine state will be reset. To keep it, pass --keep-machine-state2[0.00s] start all VLans3[0.00s] (finished: start all VLans, in 0.00 seconds)4Initializing machine ID from random generator.5[0.02s] Test will time out and terminate in 300.0 seconds6[0.02s] run the VM test script7additionally exposed symbols:8 machine,9 vlan1,10 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_ssh11[0.03s] machine: systemd-nspawn running (pid 50)12[0.03s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal...13[0.03s] machine: waiting for unit multi-user.target14nixos-nspawn(machine): TAP vde-tap1 not found; container will be isolated from VDE15nixos-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.16Note: 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.17░ Spawning container machine on /build/vm-state-machine.18machine # No journal files were found.19machine # No journal boot entry found for the specified boot (+0).20machine # [643543.318972] machine systemd-journald[58]: Journal started21machine # [643543.319062] machine systemd-journald[58]: Runtime Journal (/run/log/journal/582b20f914b349c688e924b71a758821) is 8M, max 1.2G, 1.2G free.22machine # [643543.358691] machine systemd[1]: Finished Apply Kernel Variables.23machine # [643543.382457] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.24machine # [643543.403206] machine systemd[1]: Starting Flush Journal to Persistent Storage...25machine # [643543.403925] machine systemd[1]: Starting Create Static Device Nodes in /dev...26machine # [643543.422980] machine systemd-journald[58]: Time spent on flushing to /var/log/journal/582b20f914b349c688e924b71a758821 is 1.271ms for 6 entries.27machine # [643543.422980] machine systemd-journald[58]: System Journal (/var/log/journal/582b20f914b349c688e924b71a758821) is 8M, max 4G, 3.9G free.28machine # [643543.441796] machine systemd[1]: Finished Flush Journal to Persistent Storage.29machine # [643543.442074] machine systemd[1]: Finished Create Static Device Nodes in /dev.30machine # [643543.443091] machine systemd[1]: Reached target Preparation for Local File Systems.31machine # [643543.443237] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys32machine # [643543.458836] machine systemd[1]: Finished Firewall.33machine # [643544.319297] machine systemd[1]: Mounting /run/wrappers...34machine # [643544.351941] machine systemd[1]: Mounted /run/wrappers.35machine # [643544.352608] machine systemd[1]: Reached target Local File Systems.36machine # [643544.353533] machine systemd[1]: Listening on Boot Loader Control Service Socket.37machine # [643544.354360] machine systemd[1]: Starting Create SUID/SGID Wrappers...38machine # [643544.354397] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container39machine # [643544.355154] machine systemd[1]: Starting Save Transient machine-id to Disk...40machine # [643544.357181] machine systemd[1]: Starting Create System Files and Directories...41machine # [643544.390101] machine systemd-tmpfiles[164]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted42machine # [643544.390532] machine suid-sgid-wrappers-start[171]: chmod: changing permissions of '/run/wrappers/wrappers.ssMwI7nHzs/chsh': Operation not permitted43machine # [643544.391208] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE44machine # [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 available45machine # [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 available46machine # [643544.391358] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.47machine # [643544.391554] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.48machine # [643544.391845] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal failed: Operation not permitted49machine # [643544.392036] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal/582b20f914b349c688e924b71a758821 failed: Operation not permitted50machine # [643544.392297] machine systemd-tmpfiles[164]: fchmod() of /run/log/journal failed: Operation not permitted51machine # [643544.393641] machine systemd[1]: Finished Create System Files and Directories.52machine # [643544.415043] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.53machine # [643544.435764] machine systemd[1]: Finished Save Transient machine-id to Disk.54machine # [643544.437347] machine systemd[1]: Starting Rebuild Journal Catalog...55machine # [643544.438060] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...56machine # [643544.457428] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.57machine # [643544.472836] machine systemd[1]: Finished Rebuild Journal Catalog.58machine # [643544.474361] machine systemd[1]: Starting Update is Completed...59machine # [643544.490507] machine systemd[1]: Finished Update is Completed.60machine # [643544.490693] machine systemd[1]: Reached target System Initialization.61machine # [643544.490777] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container62machine # [643544.490809] machine systemd[1]: Started Daily Cleanup of Temporary Directories.63machine # [643544.490838] machine systemd[1]: Reached target Timer Units.64machine # [643544.490967] machine systemd[1]: Listening on D-Bus System Message Bus Socket.65machine # [643544.491770] machine systemd[1]: Starting GitHub agent auth broker socket...66machine # [643544.491938] machine systemd[1]: Listening on Nix Daemon Socket.67machine # [643544.493547] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).68machine # [643544.494861] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).69machine # [643544.495663] machine systemd[1]: Listening on SSH Socket.70machine # [643544.495796] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.71machine # [643544.498622] machine systemd[1]: Listening on GitHub agent auth broker socket.72machine # [643544.498689] machine systemd[1]: Reached target Socket Units.73machine # [643544.498744] machine systemd[1]: Reached target Basic System.74machine # [643544.499721] machine systemd[1]: Starting Import lastlog data into lastlog2 database...75machine # [643544.500663] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...76machine # [643544.502801] machine systemd[1]: Starting resolvconf update...77machine # [643544.502833] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.78machine # [643544.531468] machine systemd[1]: Finished Import lastlog data into lastlog2 database.79machine # [643544.566023] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available80machine # [643544.566071] machine systemd[1]: nscd.service: Deactivated successfully.81machine # [643544.566259] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).82machine # [643544.568593] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...83machine # [643544.577852] machine resolvconf-start[239]: setfacl: /run/resolvconf: Operation not supported84machine # [643544.578971] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE85machine # [643544.579043] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available86machine # [643544.579102] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available87machine # [643544.579141] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.88machine # [643544.579360] machine systemd[1]: Failed to start resolvconf update.89machine # [643544.579533] machine systemd[1]: Reached target Preparation for Network.90machine # [643544.580558] machine systemd[1]: Starting Address configuration of eth1...91machine # [643544.581623] machine systemd[1]: Starting Extra networking commands....92machine # [643544.603152] machine network-addresses-eth1-start[242]: adding address 192.168.1.1/24... done93machine # [643544.606373] machine network-addresses-eth1-start[242]: adding address 2001:db8:1::1/64... done94machine # [643544.613446] machine systemd[1]: Finished Address configuration of eth1.95machine # [643544.647639] machine systemd[1]: Finished Extra networking commands..96machine # [643544.647828] machine systemd[1]: Reached target Network.97machine # [643544.648825] machine systemd[1]: Started Fake GitHub API for github-agent-authd test.98machine # [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"99machine # [643544.809240] machine systemd[1]: Started Name Service Cache Daemon (nsncd).100machine # [643544.809296] machine systemd[1]: Reached target Host and Network Name Lookups.101machine # [643544.809354] machine systemd[1]: Reached target User and Group Name Lookups.102machine # [643544.810450] machine systemd[1]: Starting User Login Management...103machine # [643544.811296] machine systemd[1]: Starting Permit User Sessions...104machine # [643544.830348] machine systemd[1]: Finished Permit User Sessions.105machine # [643544.831634] machine systemd[1]: Started Console Getty.106machine # [643544.831686] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0107machine # [643544.831720] machine systemd[1]: Reached target Login Prompts.108machine # [643546.544547] machine systemd-logind[311]: New seat seat0.109machine # [643546.545227] machine systemd[1]: Starting D-Bus System Message Bus...110machine # [643546.545594] machine systemd[1]: Started User Login Management.111machine # [643546.548906] machine systemd[1]: Starting linger-users.service...112machine # [643546.607456] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available113machine # [643546.607519] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available114machine # [643546.607549] machine systemd[1]: linger-users.service: Deactivated successfully.115machine # [643546.607769] machine systemd[1]: Finished linger-users.service.116machine # [643546.608595] machine systemd[1]: Reached target Multi-User System.117machine # [643547.048725] machine dbus-broker-launch[321]: Looking up NSS user entry for 'systemd-timesync'...118machine # [643547.051016] machine dbus-broker-launch[321]: NSS returned no entry for 'systemd-timesync'119machine # [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"120machine # [643547.054276] machine systemd[1]: Started D-Bus System Message Bus.121machine # [643547.056068] machine systemd[1]: Startup finished in 4.273s.122machine # [643547.075527] machine dbus-broker-launch[321]: Ready123[5.21s] machine: (finished: waiting for unit multi-user.target, in 5.18 seconds)124[5.21s] machine: waiting for unit fake-github-api.service125[5.24s] machine: (finished: waiting for unit fake-github-api.service, in 0.04 seconds)126[5.24s] machine: waiting for unit github-agent-authd.socket127[5.28s] machine: (finished: waiting for unit github-agent-authd.socket, in 0.03 seconds)128[5.28s] machine: waiting for file '/run/github-agent-authd/socket'129[5.29s] machine: (finished: waiting for file '/run/github-agent-authd/socket', in 0.02 seconds)130[5.29s] machine: must fail: systemctl is-active github-agent-authd.service131[5.32s] machine: (finished: must fail: systemctl is-active github-agent-authd.service, in 0.03 seconds)132Test 1: socket access denied for non-member user...133[5.32s] machine: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz134curl: (7) Failed to connect to localhost:80 over unix:///run/github-agent-authd/socket after 0 ms: Could not connect to server135[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)136✓ Test 1 passed137Test 2: health check via authorized user...138[5.37s] machine: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz139machine # [643547.568512] machine runuser[331]: pam_unix(runuser:session): session opened for user blocked(uid=1000) by (uid=0)140machine # [643547.594087] machine runuser[331]: pam_unix(runuser:session): session closed for user blocked141machine # [643547.620901] machine runuser[333]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)142machine # [643547.642265] machine systemd[1]: Reached target Network is Online.143machine # [643547.645929] machine systemd[1]: Starting GitHub agent auth broker...144[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)145[7.58s] machine: waiting for unit github-agent-authd.service146[7.60s] machine: (finished: waiting for unit github-agent-authd.service, in 0.02 seconds)147✓ Test 2 passed148Test 3: token retrieval and cache reuse...149[7.60s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo150[7.64s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.04 seconds)151[7.64s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo152[7.67s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds)153[7.67s] machine: must succeed: cat /tmp/fake-gh-install-repo154[7.68s] machine: (finished: must succeed: cat /tmp/fake-gh-install-repo, in 0.01 seconds)155[7.68s] machine: must succeed: cat /tmp/fake-gh-token-mints156[7.69s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds)157✓ Test 3 passed158Test 4: git credential helper returns app credentials...159[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"160[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)161✓ Test 4 passed162Test 5: github-agent-gh injects token and execs gh...163[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'164[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)165[7.77s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null'166machine # [643549.801530] machine systemd[1]: Started GitHub agent auth broker.167machine # [643549.803212] machine github-agent-authd[335]: github-agent-authd: ready idle_shutdown_timeout=30m0s168machine # [643549.805288] machine runuser[333]: pam_unix(runuser:session): session closed for user testuser169machine # [643549.835892] machine runuser[341]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)170machine # [643549.859771] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=miss latency_ms=8171machine # [643549.868809] machine runuser[341]: pam_unix(runuser:session): session closed for user testuser172machine # [643549.879621] machine runuser[348]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)173machine # [643549.894183] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0174machine # [643549.900594] machine runuser[348]: pam_unix(runuser:session): session closed for user testuser175machine # [643549.927635] machine runuser[355]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)176machine # [643549.958269] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0177machine # [643549.966924] machine runuser[355]: pam_unix(runuser:session): session closed for user testuser178machine # [643549.977655] machine runuser[365]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)179machine # [643549.991317] machine runuser[365]: pam_unix(runuser:session): session closed for user testuser180machine # [643550.009380] machine runuser[369]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)181machine # [643550.043774] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0182[7.95s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null', in 0.18 seconds)183[7.95s] machine: must succeed: cat /tmp/fake-gh-token-mints184[7.96s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds)185✓ Test 5 passed186Test 6: helper cleanly misses unknown repo for git fallback...187[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"188[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)189✓ Test 6 passed190Test 7: missing repo uses negative cache...191[8.06s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?"192[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)193[8.14s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?"194machine # [643550.170516] machine runuser[369]: pam_unix(runuser:session): session closed for user testuser195machine # [643550.206975] machine runuser[393]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)196machine # [643550.252824] machine github-agent-authd[335]: repo=test/missing latency_ms=4 kind=unknown_installation err="unknown repo/installation: test/missing"197machine # [643550.284737] machine runuser[393]: pam_unix(runuser:session): session closed for user testuser198machine # [643550.308108] machine runuser[406]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)199machine # [643550.341766] machine github-agent-authd[335]: repo=test/missing latency_ms=0 kind=unknown_installation err="unknown repo/installation: test/missing"200machine # [643550.363675] machine runuser[406]: pam_unix(runuser:session): session closed for user testuser201machine # [643550.384121] machine runuser[414]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)202machine # [643550.419205] machine github-agent-authd[335]: repo=test/missing latency_ms=0 kind=unknown_installation err="unknown repo/installation: test/missing"203machine # [643550.442993] machine runuser[414]: pam_unix(runuser:session): session closed for user testuser204[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)205[8.22s] machine: must succeed: cat /tmp/fake-gh-install-missing206[8.24s] machine: (finished: must succeed: cat /tmp/fake-gh-install-missing, in 0.02 seconds)207✓ Test 7 passed208✅ All tests passed!209[8.24s] (finished: run the VM test script, in 8.22 seconds)210[8.26s] test script finished in 8.24s211[8.26s] cleanup212[8.26s] kill NspawnMachine (pid 50)213Container machine terminated by signal KILL.214[8.38s] (finished: cleanup, in 0.12 seconds)