2019-11-05 12:27:15 +01:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
2018-09-01 04:19:53 +02:00
|
|
|
name = "bcachefs";
|
2021-01-10 20:08:30 +01:00
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ chiiruno ];
|
2018-09-01 04:19:53 +02:00
|
|
|
|
|
|
|
machine = { pkgs, ... }: {
|
|
|
|
virtualisation.emptyDiskImages = [ 4096 ];
|
|
|
|
networking.hostId = "deadbeef";
|
|
|
|
boot.supportedFilesystems = [ "bcachefs" ];
|
|
|
|
environment.systemPackages = with pkgs; [ parted ];
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-11-05 12:27:15 +01:00
|
|
|
machine.succeed("modprobe bcachefs")
|
|
|
|
machine.succeed("bcachefs version")
|
|
|
|
machine.succeed("ls /dev")
|
2020-08-02 11:25:04 +02:00
|
|
|
|
2019-11-05 12:27:15 +01:00
|
|
|
machine.succeed(
|
|
|
|
"mkdir /tmp/mnt",
|
|
|
|
"udevadm settle",
|
|
|
|
"parted --script /dev/vdb mklabel msdos",
|
|
|
|
"parted --script /dev/vdb -- mkpart primary 1024M -1s",
|
|
|
|
"udevadm settle",
|
|
|
|
# Due to #32279, we cannot use encryption for this test yet
|
|
|
|
# "echo password | bcachefs format --encrypted /dev/vdb1",
|
|
|
|
# "echo password | bcachefs unlock /dev/vdb1",
|
|
|
|
"bcachefs format /dev/vdb1",
|
|
|
|
"mount -t bcachefs /dev/vdb1 /tmp/mnt",
|
|
|
|
"udevadm settle",
|
|
|
|
"bcachefs fs usage /tmp/mnt",
|
|
|
|
"umount /tmp/mnt",
|
|
|
|
"udevadm settle",
|
|
|
|
)
|
2018-09-01 04:19:53 +02:00
|
|
|
'';
|
|
|
|
})
|