fixup! test(nix): add basic functionality testing infra

This commit is contained in:
Thomas Mühlbacher 2024-06-27 16:30:15 +02:00
parent 77e90e74bc
commit 65f1c3f52a
4 changed files with 10 additions and 9 deletions

View File

@ -35,6 +35,7 @@ let
];
environment.variables = {
BCACHEFS_LOG = "trace";
RUST_BACKTRACE = "full";
};
};

View File

@ -28,10 +28,10 @@ echo "$pw" | bcachefs format \
udevadm settle
echo "$pw" | bcachefs mount -v "UUID=$uuid" "$mnt"
echo "$pw" | bcachefs mount "UUID=$uuid" "$mnt"
keyctl search @u user "bcachefs:$uuid"
umount "$mnt"
bcachefs mount -v "${blkdev}1" "$mnt"
bcachefs mount "${blkdev}1" "$mnt"

View File

@ -23,7 +23,7 @@ bcachefs unlock -c "$blkdev"
echo "$pw" | bcachefs unlock "$blkdev"
key_id=$(keyctl search @u user "bcachefs:$uuid")
bcachefs mount -v "$blkdev" "$mnt"
bcachefs mount "$blkdev" "$mnt"
umount "$mnt"
keyctl unlink "$key_id"
@ -36,20 +36,20 @@ umount "$mnt"
keyctl unlink "$key_id"
bcachefs mount -v -f <(echo "$pw") "$blkdev" "$mnt"
bcachefs mount -f <(echo "$pw") "$blkdev" "$mnt"
key_id=$(keyctl search @u user "bcachefs:$uuid")
umount "$mnt"
keyctl unlink "$key_id"
echo "$pw" | bcachefs mount -v -k stdin "$blkdev" "$mnt"
echo "$pw" | bcachefs mount -k stdin "$blkdev" "$mnt"
key_id=$(keyctl search @u user "bcachefs:$uuid")
umount "$mnt"
keyctl unlink "$key_id"
echo "$pw" | bcachefs mount -v "$blkdev" "$mnt"
echo "$pw" | bcachefs mount "$blkdev" "$mnt"
key_id=$(keyctl search @u user "bcachefs:$uuid")
umount "$mnt"
bcachefs mount -v -k fail "$blkdev"
bcachefs mount -v -k wait "$blkdev" "$mnt"
bcachefs mount -k fail "$blkdev"
bcachefs mount -k wait "$blkdev" "$mnt"
umount "$mnt"
keyctl unlink "$key_id"

View File

@ -19,7 +19,7 @@ echo "$pw" | bcachefs format \
udevadm settle
echo "$pw" | bcachefs mount -v "UUID=$uuid" "$mnt1"
echo "$pw" | bcachefs mount "UUID=$uuid" "$mnt1"
fallocate --length 2G "$mnt1/fs.img"