nixos/bcachefs: port test to python
This commit is contained in:
parent
0f96f9f038
commit
f794de4e31
|
@ -1,4 +1,4 @@
|
||||||
import ./make-test.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "bcachefs";
|
name = "bcachefs";
|
||||||
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ chiiruno ];
|
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ chiiruno ];
|
||||||
|
|
||||||
|
@ -10,29 +10,25 @@ import ./make-test.nix ({ pkgs, ... }: {
|
||||||
};
|
};
|
||||||
|
|
||||||
testScript = ''
|
testScript = ''
|
||||||
$machine->succeed("modprobe bcachefs");
|
machine.succeed("modprobe bcachefs")
|
||||||
$machine->succeed("bcachefs version");
|
machine.succeed("bcachefs version")
|
||||||
$machine->succeed("ls /dev");
|
machine.succeed("ls /dev")
|
||||||
|
|
||||||
$machine->succeed(
|
machine.succeed(
|
||||||
"mkdir /tmp/mnt",
|
"mkdir /tmp/mnt",
|
||||||
|
"udevadm settle",
|
||||||
"udevadm settle",
|
"parted --script /dev/vdb mklabel msdos",
|
||||||
"parted --script /dev/vdb mklabel msdos",
|
"parted --script /dev/vdb -- mkpart primary 1024M -1s",
|
||||||
"parted --script /dev/vdb -- mkpart primary 1024M -1s",
|
"udevadm settle",
|
||||||
"udevadm settle",
|
# Due to #32279, we cannot use encryption for this test yet
|
||||||
|
# "echo password | bcachefs format --encrypted /dev/vdb1",
|
||||||
# Due to #32279, we cannot use encryption for this test yet
|
# "echo password | bcachefs unlock /dev/vdb1",
|
||||||
# "echo password | bcachefs format --encrypted /dev/vdb1",
|
"bcachefs format /dev/vdb1",
|
||||||
# "echo password | bcachefs unlock /dev/vdb1",
|
"mount -t bcachefs /dev/vdb1 /tmp/mnt",
|
||||||
"bcachefs format /dev/vdb1",
|
"udevadm settle",
|
||||||
"mount -t bcachefs /dev/vdb1 /tmp/mnt",
|
"bcachefs fs usage /tmp/mnt",
|
||||||
"udevadm settle",
|
"umount /tmp/mnt",
|
||||||
|
"udevadm settle",
|
||||||
"bcachefs fs usage /tmp/mnt",
|
)
|
||||||
|
|
||||||
"umount /tmp/mnt",
|
|
||||||
"udevadm settle"
|
|
||||||
);
|
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue