Merge #45774: linux_testing_bcachefs: upgrade, add tests

This commit is contained in:
Vladimír Čunát 2018-09-01 10:44:21 +02:00
commit 9b0649ae3e
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
4 changed files with 47 additions and 7 deletions

View File

@ -422,6 +422,7 @@ in rec {
tests.yabar = callTest tests/yabar.nix {};
tests.zookeeper = callTest tests/zookeeper.nix {};
tests.morty = callTest tests/morty.nix { };
tests.bcachefs = callTest tests/bcachefs.nix { };
/* Build a bunch of typical closures so that Hydra can keep track of
the evolution of closure sizes. */

38
nixos/tests/bcachefs.nix Normal file
View File

@ -0,0 +1,38 @@
import ./make-test.nix ({ pkgs, ... }: {
name = "bcachefs";
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ chiiruno ];
machine = { pkgs, ... }: {
virtualisation.emptyDiskImages = [ 4096 ];
networking.hostId = "deadbeef";
boot.supportedFilesystems = [ "bcachefs" ];
environment.systemPackages = with pkgs; [ parted ];
};
testScript = ''
$machine->succeed("modprobe bcachefs");
$machine->succeed("bcachefs version");
$machine->succeed("ls /dev");
$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"
);
'';
})

View File

@ -1,13 +1,13 @@
{ stdenv, buildPackages, fetchgit, perl, buildLinux, ... } @ args:
buildLinux (args // rec {
version = "4.16.2018.08.03";
modDirVersion = "4.16.0";
version = "4.18.2018.08.31";
modDirVersion = "4.18.0";
src = fetchgit {
url = "https://evilpiepirate.org/git/bcachefs.git";
rev = "e7a00a52b57336c04d1043c6fa0a67a7c8301cfb";
sha256 = "1a0kvpazvvh0rfb9hkyr4zw55ndh060j95fvhf2aaaj9qyc7p7wp";
rev = "9c08efd02b827e6ee2a6e5a751045c6c6bd484d4";
sha256 = "0xnkg0fpilmwckyb1drspggv3ibx8vkqic9ai53d5vx2rrnvvafw";
};
extraConfig = "BCACHEFS_FS m";
@ -16,6 +16,7 @@ buildLinux (args // rec {
branch = "master";
hydraPlatforms = []; # Should the testing kernels ever be built on Hydra?
maintainers = with stdenv.lib.maintainers; [ davidak chiiruno ];
platforms = [ "x86_64-linux" ];
};
} // (args.argsOverride or {}))

View File

@ -2,12 +2,12 @@
, liburcu, zlib, libaio, zstd, lz4 }:
stdenv.mkDerivation rec {
name = "bcachefs-tools-unstable-2018-07-21";
name = "bcachefs-tools-unstable-2018-08-22";
src = fetchgit {
url = "https://evilpiepirate.org/git/bcachefs-tools.git";
rev = "cecf7e05e151499a3e96dc05f97f37c14162e94b";
sha256 = "18vmyrjwza1iv0apkykbqsnnic5lrqlwfsrj85pgrpwzii36i8i0";
rev = "ebf97e8e01a8e76ff4bec23f29106430852c3081";
sha256 = "0f2ycin0gmi1a4fm7qln0c10zn451gljfbc2piy1fm768xqqrmld";
};
enableParallelBuilding = true;