container-test-run-github-agent-authd
checks.x86_64-linux.nixosTests.github-agent-authd.x86_64-linux
· build #186
· 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.02s] machine: systemd-nspawn running (pid 50)12[0.02s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal...13[0.02s] 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 # [639919.324304] machine systemd-journald[58]: Journal started19machine # [639919.324374] machine systemd-journald[58]: Runtime Journal (/run/log/journal/76f57eb16c49471b9b987ac97d7190e7) is 8M, max 1.2G, 1.2G free.20machine # [639919.336007] machine systemd[1]: Finished Apply Kernel Variables.21machine # [639919.347976] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.22machine # [639919.363699] machine systemd[1]: Starting Flush Journal to Persistent Storage...23machine # [639919.364480] machine systemd[1]: Starting Create Static Device Nodes in /dev...24machine # [639919.378475] machine systemd-journald[58]: Time spent on flushing to /var/log/journal/76f57eb16c49471b9b987ac97d7190e7 is 1.480ms for 6 entries.25machine # [639919.378475] machine systemd-journald[58]: System Journal (/var/log/journal/76f57eb16c49471b9b987ac97d7190e7) is 8M, max 4G, 3.9G free.26machine # [639919.394103] machine systemd[1]: Finished Flush Journal to Persistent Storage.27machine # [639919.394388] machine systemd[1]: Finished Create Static Device Nodes in /dev.28machine # [639919.395227] machine systemd[1]: Reached target Preparation for Local File Systems.29machine # [639919.395367] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys30machine # [639919.426489] machine systemd[1]: Finished Firewall.31machine # [639920.325714] machine systemd[1]: Mounting /run/wrappers...32machine # [639920.358425] machine systemd[1]: Mounted /run/wrappers.33machine # [639920.359065] machine systemd[1]: Reached target Local File Systems.34machine # [639920.359943] machine systemd[1]: Listening on Boot Loader Control Service Socket.35machine # [639920.360737] machine systemd[1]: Starting Create SUID/SGID Wrappers...36machine # [639920.360769] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container37machine # [639920.361430] machine systemd[1]: Starting Save Transient machine-id to Disk...38machine # [639920.362073] machine systemd[1]: Starting Create System Files and Directories...39machine # [639920.385790] machine systemd-tmpfiles[164]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted40machine # [639920.386526] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal failed: Operation not permitted41machine # [639920.386705] machine systemd-tmpfiles[164]: fchmod() of /var/log/journal/76f57eb16c49471b9b987ac97d7190e7 failed: Operation not permitted42machine # [639920.386981] machine systemd-tmpfiles[164]: fchmod() of /run/log/journal failed: Operation not permitted43machine # [639920.388699] machine suid-sgid-wrappers-start[171]: chmod: changing permissions of '/run/wrappers/wrappers.jsmOMviNwH/chsh': Operation not permitted44machine # [639920.394091] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE45machine # [639920.394150] 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 # [639920.394207] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available47machine # [639920.394246] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.48machine # [639920.394442] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.49machine # [639920.394748] machine systemd[1]: Finished Create System Files and Directories.50machine # [639920.414727] machine systemd[1]: Starting Rebuild Journal Catalog...51machine # [639920.415561] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...52machine # [639920.434583] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.53machine # [639920.451308] machine systemd[1]: Finished Rebuild Journal Catalog.54machine # [639920.452425] machine systemd[1]: Starting Update is Completed...55machine # [639920.470999] machine systemd[1]: Finished Update is Completed.56machine # [639920.471183] machine systemd[1]: Reached target System Initialization.57machine # [639920.471273] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container58machine # [639920.471313] machine systemd[1]: Started Daily Cleanup of Temporary Directories.59machine # [639920.471343] machine systemd[1]: Reached target Timer Units.60machine # [639920.471478] machine systemd[1]: Listening on D-Bus System Message Bus Socket.61machine # [639920.472312] machine systemd[1]: Starting GitHub agent auth broker socket...62machine # [639920.472483] machine systemd[1]: Listening on Nix Daemon Socket.63machine # [639920.473803] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).64machine # [639920.474778] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).65machine # [639920.475481] machine systemd[1]: Listening on SSH Socket.66machine # [639920.475621] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.67machine # [639920.476516] machine systemd[1]: Listening on GitHub agent auth broker socket.68machine # [639920.476587] machine systemd[1]: Reached target Socket Units.69machine # [639920.476643] machine systemd[1]: Reached target Basic System.70machine # [639920.477596] machine systemd[1]: Starting Import lastlog data into lastlog2 database...71machine # [639920.478447] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...72machine # [639920.479193] machine systemd[1]: Starting resolvconf update...73machine # [639920.479217] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.74machine # [639920.497616] machine systemd[1]: Finished Import lastlog data into lastlog2 database.75machine # [639920.530443] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available76machine # [639920.530485] machine systemd[1]: nscd.service: Deactivated successfully.77machine # [639920.530650] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).78machine # [639920.532956] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...79machine # [639920.542949] machine resolvconf-start[238]: setfacl: /run/resolvconf: Operation not supported80machine # [639920.543450] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE81machine # [639920.543509] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available82machine # [639920.543564] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available83machine # [639920.543593] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.84machine # [639920.544108] machine systemd[1]: Failed to start resolvconf update.85machine # [639920.544775] machine systemd[1]: Reached target Preparation for Network.86machine # [639920.546218] machine systemd[1]: Starting Address configuration of eth1...87machine # [639920.547169] machine systemd[1]: Starting Extra networking commands....88machine # [639920.563741] machine network-addresses-eth1-start[241]: adding address 192.168.1.1/24... done89machine # [639920.566193] machine network-addresses-eth1-start[241]: adding address 2001:db8:1::1/64... done90machine # [639920.570427] machine systemd[1]: Finished Address configuration of eth1.91machine # [639920.608775] machine systemd[1]: Finished Extra networking commands..92machine # [639920.608966] machine systemd[1]: Reached target Network.93machine # [639920.609924] machine systemd[1]: Started Fake GitHub API for github-agent-authd test.94machine # [639920.675368] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.95machine # [639920.676582] machine systemd[1]: Finished Save Transient machine-id to Disk.96machine # [639920.732223] machine nsncd[229]: Nov 22 17:59:31.562 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket"97machine # [639920.732317] machine systemd[1]: Started Name Service Cache Daemon (nsncd).98machine # [639920.732401] machine systemd[1]: Reached target Host and Network Name Lookups.99machine # [639920.732474] machine systemd[1]: Reached target User and Group Name Lookups.100machine # [639920.733665] machine systemd[1]: Starting User Login Management...101machine # [639920.734456] machine systemd[1]: Starting Permit User Sessions...102machine # [639920.752157] machine systemd[1]: Finished Permit User Sessions.103machine # [639920.753133] machine systemd[1]: Started Console Getty.104machine # [639920.753176] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0105machine # [639920.753206] machine systemd[1]: Reached target Login Prompts.106machine # [639921.977719] machine systemd-logind[311]: New seat seat0.107machine # [639921.978668] machine systemd[1]: Starting D-Bus System Message Bus...108machine # [639921.978959] machine systemd[1]: Started User Login Management.109machine # [639921.979809] machine systemd[1]: Starting linger-users.service...110machine # [639922.000657] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available111machine # [639922.000781] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available112machine # [639922.000823] machine systemd[1]: linger-users.service: Deactivated successfully.113machine # [639922.001015] machine systemd[1]: Finished linger-users.service.114machine # [639922.001370] machine systemd[1]: Reached target Multi-User System.115[4.17s] machine: (finished: waiting for unit multi-user.target, in 4.15 seconds)116[4.17s] machine: waiting for unit fake-github-api.service117[4.19s] machine: (finished: waiting for unit fake-github-api.service, in 0.02 seconds)118[4.19s] machine: waiting for unit github-agent-authd.socket119[4.21s] machine: (finished: waiting for unit github-agent-authd.socket, in 0.02 seconds)120[4.21s] machine: waiting for file '/run/github-agent-authd/socket'121[4.22s] machine: (finished: waiting for file '/run/github-agent-authd/socket', in 0.01 seconds)122[4.22s] machine: must fail: systemctl is-active github-agent-authd.service123[4.23s] machine: (finished: must fail: systemctl is-active github-agent-authd.service, in 0.01 seconds)124Test 1: socket access denied for non-member user...125[4.23s] machine: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz126machine # [639922.435393] machine dbus-broker-launch[321]: Looking up NSS user entry for 'systemd-timesync'...127machine # [639922.439924] machine dbus-broker-launch[321]: NSS returned no entry for 'systemd-timesync'128machine # [639922.440942] 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"129machine # [639922.440725] machine systemd[1]: Started D-Bus System Message Bus.130machine # [639922.441055] machine systemd[1]: Startup finished in 3.523s.131machine # [639922.454202] machine dbus-broker-launch[321]: Ready132curl: (7) Failed to connect to localhost:80 over unix:///run/github-agent-authd/socket after 0 ms: Could not connect to server133[4.25s] machine: (finished: must fail: runuser -u blocked -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 0.02 seconds)134✓ Test 1 passed135Test 2: health check via authorized user...136[4.25s] machine: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz137machine # [639922.772730] machine runuser[331]: pam_unix(runuser:session): session opened for user blocked(uid=1000) by (uid=0)138machine # [639922.784496] machine runuser[331]: pam_unix(runuser:session): session closed for user blocked139machine # [639922.798196] machine runuser[333]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)140machine # [639922.809874] machine systemd[1]: Reached target Network is Online.141machine # [639922.811645] machine systemd[1]: Starting GitHub agent auth broker...142[5.73s] machine: (finished: must succeed: runuser -u testuser -- curl --unix-socket /run/github-agent-authd/socket -fsS http://localhost/healthz, in 1.48 seconds)143[5.73s] machine: waiting for unit github-agent-authd.service144[5.75s] machine: (finished: waiting for unit github-agent-authd.service, in 0.02 seconds)145✓ Test 2 passed146Test 3: token retrieval and cache reuse...147[5.75s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo148[5.78s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds)149[5.78s] machine: must succeed: runuser -u testuser -- github-agent-token --repo test/repo150[5.81s] machine: (finished: must succeed: runuser -u testuser -- github-agent-token --repo test/repo, in 0.03 seconds)151[5.81s] machine: must succeed: cat /tmp/fake-gh-install-repo152[5.82s] machine: (finished: must succeed: cat /tmp/fake-gh-install-repo, in 0.01 seconds)153[5.82s] machine: must succeed: cat /tmp/fake-gh-token-mints154[5.83s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds)155✓ Test 3 passed156Test 4: git credential helper returns app credentials...157[5.83s] 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"158[5.86s] 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)159✓ Test 4 passed160Test 5: github-agent-gh injects token and execs gh...161[5.86s] 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'162[5.88s] 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)163[5.88s] machine: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null'164machine # [639924.261405] machine systemd[1]: Started GitHub agent auth broker.165machine # [639924.263508] machine github-agent-authd[335]: github-agent-authd: ready idle_shutdown_timeout=30m0s166machine # [639924.264896] machine runuser[333]: pam_unix(runuser:session): session closed for user testuser167machine # [639924.289747] machine runuser[341]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)168machine # [639924.308026] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=miss latency_ms=5169machine # [639924.313361] machine runuser[341]: pam_unix(runuser:session): session closed for user testuser170machine # [639924.322500] machine runuser[348]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)171machine # [639924.335430] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0172machine # [639924.341502] machine runuser[348]: pam_unix(runuser:session): session closed for user testuser173machine # [639924.367928] machine runuser[355]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)174machine # [639924.389862] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0175machine # [639924.396350] machine runuser[355]: pam_unix(runuser:session): session closed for user testuser176machine # [639924.405167] machine runuser[365]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)177machine # [639924.417995] machine runuser[365]: pam_unix(runuser:session): session closed for user testuser178machine # [639924.426664] machine runuser[369]: pam_unix(runuser:session): session opened for user testuser(uid=1001) by (uid=0)179machine # [639924.454923] machine github-agent-authd[335]: repo=test/repo installation_id=101 cache_outcome=positive_hit latency_ms=0180machine # [639924.519310] machine runuser[369]: pam_unix(runuser:session): session closed for user testuser181[5.99s] machine: (finished: must succeed: runuser -u testuser -- bash -lc 'cd /tmp/gh-test && gh help >/dev/null', in 0.10 seconds)182[5.99s] machine: must succeed: cat /tmp/fake-gh-token-mints183[6.00s] machine: (finished: must succeed: cat /tmp/fake-gh-token-mints, in 0.01 seconds)184✓ Test 5 passed185Test 6: helper cleanly misses unknown repo for git fallback...186[6.00s] 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"187[6.05s] 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.05 seconds)188✓ Test 6 passed189Test 7: missing repo uses negative cache...190[6.05s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?"191[6.09s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.04 seconds)192[6.09s] machine: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?"193[6.13s] machine: (finished: must succeed: runuser -u testuser -- bash -lc "github-agent-token --repo test/missing >/dev/null 2>&1; echo \$?", in 0.04 seconds)194[6.13s] machine: must succeed: cat /tmp/fake-gh-install-missing195[6.14s] machine: (finished: must succeed: cat /tmp/fake-gh-install-missing, in 0.01 seconds)196✓ Test 7 passed197✅ All tests passed!198[6.14s] (finished: run the VM test script, in 6.12 seconds)199[6.15s] test script finished in 6.13s200[6.15s] cleanup201[6.15s] kill NspawnMachine (pid 50)202Container machine terminated by signal KILL.203[6.21s] (finished: cleanup, in 0.06 seconds)