Skip to content

Commit 755ac8f

Browse files
committed
Fix TestStubBlockDevices_Isolated
Since Firecracker 0.20.0 can report the size of a special block device correctly, the size of the block device from devmapper snapshotter won't be zero. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent b67f582 commit 755ac8f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

runtime/service_integ_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,11 @@ func TestStubBlockDevices_Isolated(t *testing.T) {
734734
}
735735

736736
const expectedOutput = `
737-
vdb 254:16 0 0B 0 |
738-
vdc 254:32 0 512B 0 | 214 244 216 245 215 177 177 177
739-
vdd 254:48 0 512B 0 | 214 244 216 245 215 177 177 177
740-
vde 254:64 0 512B 0 | 214 244 216 245 215 177 177 177
741-
vdf 254:80 0 512B 0 | 214 244 216 245 215 177 177 177`
737+
vdb 254:16 0 1073741824B 0 | 0 0 0 0 0 0 0 0
738+
vdc 254:32 0 512B 0 | 214 244 216 245 215 177 177 177
739+
vdd 254:48 0 512B 0 | 214 244 216 245 215 177 177 177
740+
vde 254:64 0 512B 0 | 214 244 216 245 215 177 177 177
741+
vdf 254:80 0 512B 0 | 214 244 216 245 215 177 177 177`
742742

743743
parts := strings.Split(stdout.String(), "vdb")
744744
require.Equal(t, strings.TrimSpace(expectedOutput), strings.TrimSpace("vdb"+parts[1]))

tools/docker/scripts/lsblk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ do
2222
# https://github.com/firecracker-microvm/firecracker-containerd/blob/2578f3df9d899aa48decb39c9f7f23fa41635ede/internal/common.go#L67
2323
magic=$(head -c 8 /dev/$name | od -A n -t u1)
2424

25-
printf "%-4s %-7s %2d %8dB %2d | %s\n" \
25+
printf "%-4s %-7s %2d %10dB %2d | %s\n" \
2626
"$name" \
2727
$(cat /sys/block/$name/dev) \
2828
$(cat /sys/block/$name/removable) \

0 commit comments

Comments
 (0)