fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

mountinfo_test.go: add additional test case for lvm device (#443)

+29
+29
internal/mountinfo/mountinfo_test.go
··· 61 61 62 62 expectedDeviceName: "vda", 63 63 }, 64 + { 65 + name: "should find the device name for a lvm volume backed by a single disk", 66 + 67 + // ( lsblk output from the snapshotted machine) 68 + // ~ # lsblk 69 + // NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS 70 + // sda 8:0 0 7.3T 0 disk 71 + // └─sda1 8:1 0 1024G 0 part /var/lib/plex 72 + // nvme0n1 259:0 0 1.8T 0 disk 73 + // ├─nvme0n1p1 259:1 0 529M 0 part 74 + // ├─nvme0n1p2 259:2 0 99M 0 part 75 + // ├─nvme0n1p3 259:3 0 16M 0 part 76 + // ├─nvme0n1p4 259:4 0 293G 0 part 77 + // ├─nvme0n1p5 259:5 0 512M 0 part /boot 78 + // └─nvme0n1p6 259:6 0 1.5T 0 part 79 + // └─pool-nixos 254:0 0 600G 0 lvm /nix/store 80 + // / # test targets this device 81 + 82 + sysfsTarballFile: "sysfs.lvm.dm-0.tar.gz", 83 + 84 + deviceMajor: 254, // points to dm-0 device 85 + deviceMinor: 0, 86 + 87 + // TODO@ggilmore: technically, dm-0 is a lvm volume backed by a partition stored on the nvme device. 88 + // For consistency with the other test case, we should be returning nvme0n1 (the parent disk device) as the 89 + // device name. I'll revisit this later, as I need to figure out how to programmatically determine 90 + // the nvme01n1 <-> dm-0 translation. 91 + expectedDeviceName: "dm-0", 92 + }, 64 93 } { 65 94 test := test 66 95
internal/mountinfo/testdata/sysfs.lvm.dm-0.tar.gz

This is a binary file and will not be displayed.