!jtzdZrQSXtEpeGtzAn:nixos.org

Testing with Nix

91 Members
24 Servers

Load older messages


SenderMessageTime
25 Aug 2023
@alper-celik:matrix.orgAlper Çelik joined the room.04:31:12
21 Sep 2023
@baloo_:matrix.orgbalooIs there a trick to inject CARRIER state changes on a NIC with qemu?18:35:26
@baloo_:matrix.orgbalooI can't find any, but I would absolutely love to be able to test behavior of systemd-networkd irt carrier changes18:36:18
@baloo_:matrix.orgbaloo
machine.send_monitor_command("set_link net1 off")

Or something around that

20:23:20
@baloo_:matrix.orgbaloothat is: if I read qemu's virtio code correctly and linux code correctly as well20:23:43
@dedmunwalk:matrix.orgdedmunwalk joined the room.23:07:11
24 Sep 2023
@mib:kanp.aimib 🥐 joined the room.12:21:07
27 Sep 2023
@mib:kanp.aimib 🥐 changed their display name from mib to mib 🥐.05:53:09
28 Sep 2023
@a-kenji:matrix.orga-kenji joined the room.12:15:59
3 Oct 2023
@ultra:beeper.comultra (NixOS integrated with PackageKit wen) joined the room.15:47:06
4 Oct 2023
@roberthensing:matrix.orgRobert Hensing (roberth)mind if I (ab)use the hydra job for https://github.com/NixOS/nixpkgs/pull/258571?16:09:33
@raitobezarius:matrix.orgraitobezariusgo ahead16:10:18
6 Oct 2023
@ultra:beeper.comultra (NixOS integrated with PackageKit wen) changed their display name from Alex S to ultra (NixOS integrated with PackageKit wen).16:30:06
8 Oct 2023
@realnyte:matrix.orgrealnyte joined the room.11:53:04
9 Oct 2023
@b:chreekat.netchreekat changed their display name from chreekat to chreekat (afk, admin day).10:19:20
10 Oct 2023
@b:chreekat.netchreekat changed their display name from chreekat (afk, admin day) to chreekat.11:40:03
12 Oct 2023
@b:chreekat.netchreekat changed their display name from chreekat to chreekat (afk, sick).08:03:13
14 Oct 2023
@b:chreekat.netchreekat changed their display name from chreekat (afk, sick) to chreekat.08:53:53
16 Oct 2023
@vengmark2:matrix.orgl0b0 joined the room.05:27:22
@vengmark2:matrix.orgl0b0Hullo :)05:27:29
@artturin:matrix.orgArtturin

: How do I check the exit code of a backgrounded process? Backgrounding a process using >/dev/console & and then running server.succeed("wait") doesn't produce the expected result (a failure, because the ssh-audit program produced error output), and during local tests this resulted in exit code 3.
E

05:33:05
@vengmark2:matrix.orgl0b0
In reply to @artturin:matrix.org

: How do I check the exit code of a backgrounded process? Backgrounding a process using >/dev/console & and then running server.succeed("wait") doesn't produce the expected result (a failure, because the ssh-audit program produced error output), and during local tests this resulted in exit code 3.
E

I was able to hack together something which works, but it's ugly: https://gitlab.com/engmark/root/-/merge_requests/395/diffs#33ce68c7de7e3ce31b451013ce4f892b655e8073_41_54
05:33:40
@vengmark2:matrix.orgl0b0

The ugliness comes from several issues:

  • The ssh-audit exit code is the only unambiguous indication of success. It always prints to stdout, even in case of success, and doesn't print errors to stderr.
  • ssh-audit has to run asynchronously because a client needs to talk to it to produce the report.
  • I can't use wait_for_open_port because that triggers ssh-audit to exit - it's not meant to be a permanent service, after all.
  • In case of error I have to look at the output to see which changes it recommends to my configuration, so I have to redirect ssh-audit stdout to /dev/console.
05:38:57
@artturin:matrix.orgArtturinThis file has all the test driver commands https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/test-driver/test_driver/machine.py05:39:07
@vengmark2:matrix.orgl0b0 *

The ugliness comes from several issues:

  • The ssh-audit exit code is the only unambiguous indication of success. ssh-audit always prints to stdout, even in case of success, and doesn't print errors to stderr.
  • ssh-audit has to run asynchronously because a client needs to talk to it to produce the report.
  • I can't use wait_for_open_port because that triggers ssh-audit to exit - it's not meant to be a permanent service, after all.
  • In case of error I have to look at the output to see which changes it recommends to my configuration, so I have to redirect ssh-audit stdout to /dev/console.
05:39:10
@vengmark2:matrix.orgl0b0 *

The ugliness comes from several issues:

  • The ssh-audit exit code is the only unambiguous indication of success. ssh-audit always prints to stdout, even in case of success, and doesn't print errors to stderr.
  • ssh-audit has to run asynchronously because a client needs to talk to it to produce the report.
  • I can't use wait_for_open_port because that triggers ssh-audit to exit - it's not meant to be a permanent service, after all. ssh-audit doesn't print anything to indicate it's ready to receive connections, so I also can't check for specific output to verify that it's ready.
  • In case of error I have to look at the output to see which changes it recommends to my configuration, so I have to redirect ssh-audit stdout to /dev/console.
05:41:00
@artturin:matrix.orgArtturin

l0b0:

$ bash -c "exit 3"
$ echo $?
3
$ systemd-run --user bash -c "exit 3"
Running as unit: run-r87bbe16cbe554be0965fc147cc7ecc81.service
$ systemctl show --user run-r87bbe16cbe554be0965fc147cc7ecc81.service --property="ExecMainStatus"
ExecMainStatus=3
05:48:08
@vengmark2:matrix.orgl0b0
In reply to @artturin:matrix.org

l0b0:

$ bash -c "exit 3"
$ echo $?
3
$ systemd-run --user bash -c "exit 3"
Running as unit: run-r87bbe16cbe554be0965fc147cc7ecc81.service
$ systemctl show --user run-r87bbe16cbe554be0965fc147cc7ecc81.service --property="ExecMainStatus"
ExecMainStatus=3
Oh, nifty! Can I control the unit name, or do I have to parse stdout to get it?
05:48:56
@vengmark2:matrix.orgl0b0
In reply to @artturin:matrix.org

l0b0:

$ bash -c "exit 3"
$ echo $?
3
$ systemd-run --user bash -c "exit 3"
Running as unit: run-r87bbe16cbe554be0965fc147cc7ecc81.service
$ systemctl show --user run-r87bbe16cbe554be0965fc147cc7ecc81.service --property="ExecMainStatus"
ExecMainStatus=3
* Oh, nifty! ~Can I control the unit name, or do I have to parse stdout to get it?~ I'll just check…
05:49:10
@artturin:matrix.orgArtturin you can with -u 05:49:18

Show newer messages


Back to Room ListRoom Version: 9