Need for a test site #1

Open
opened 2026-06-24 15:48:48 +00:00 by kira · 3 comments
Owner

Need to implement some sort of test site for this.
Problem is it should be run as init to properly test it.
But most can be tested in chroot? Or even without, but test need to be run as root. So probably spinning vm actually is only right way?

Need to implement some sort of test site for this. Problem is it should be run as init to properly test it. But most can be tested in chroot? Or even without, but test need to be run as root. So probably spinning vm actually is only right way?
kira added the help wanted label 2026-06-24 15:48:48 +00:00
Owner

i do tests in real circumstances mostly.. VM first if possible and on real hardware second.

i do tests in real circumstances mostly.. VM first if possible and on real hardware second.
Author
Owner

For testing all then needs its some disk, in case of vm easy to add, size not matter much, 1GB is enough.
Create GPT part table on it, and one partition with GPT label "bee-root"

Then format it
sudo bcachefs format --compression=lz4 --background_compression=lz4 --encrypted /dev/disk/by-partlabel/bee-root
Or without --encrypted also

Then for snapshots selections testing need to create snapshots

If it encrypted
bcachefs unlock /dev/disk/by-partlabel/bee-root

Mount
sudo mount -t bcachefs /dev/loop0 /mnt/test/

Snapshot
sudo bcachefs subvolume snapshot /mnt/test/ /mnt/test/bzz_snaps/bzz-2026-01-10T23-23-23
For example.

Then unmount, maybe reboot. And you will have device ready for testing.

Need to boot into VM with attached dev and run compiled binary.
If dev unencrypted and have no snaps it should just skip to switch_root without even any output.

If encrypted ask for password.

If snapshots it waits 2.5 sec for F2 key press.
And if key pressed should list available snapshots.

Ill may create vbox and qemu disk images for testing a bit later.

Sound as a plan. Can write script for image creation and such

For testing all then needs its some disk, in case of vm easy to add, size not matter much, 1GB is enough. Create GPT part table on it, and one partition with GPT label "bee-root" Then format it `sudo bcachefs format --compression=lz4 --background_compression=lz4 --encrypted /dev/disk/by-partlabel/bee-root` Or without --encrypted also Then for snapshots selections testing need to create snapshots If it encrypted `bcachefs unlock /dev/disk/by-partlabel/bee-root` Mount `sudo mount -t bcachefs /dev/loop0 /mnt/test/` Snapshot `sudo bcachefs subvolume snapshot /mnt/test/ /mnt/test/bzz_snaps/bzz-2026-01-10T23-23-23` For example. Then unmount, maybe reboot. And you will have device ready for testing. Need to boot into VM with attached dev and run compiled binary. If dev unencrypted and have no snaps it should just skip to switch_root without even any output. If encrypted ask for password. If snapshots it waits 2.5 sec for F2 key press. And if key pressed should list available snapshots. Ill may create vbox and qemu disk images for testing a bit later. Sound as a plan. Can write script for image creation and such
Author
Owner

Ofcourse bcachefs kernel modules and utilities must be installed

Ofcourse bcachefs kernel modules and utilities must be installed
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kira-linux/nyanit#1