Skip to content

Commit fc4110c

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 8643b62 commit fc4110c

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
@@ -677,11 +677,11 @@ func TestStubBlockDevices_Isolated(t *testing.T) {
677677
}
678678

679679
const expectedOutput = `
680-
vdb 254:16 0 0B 0 |
681-
vdc 254:32 0 512B 0 | 214 244 216 245 215 177 177 177
682-
vdd 254:48 0 512B 0 | 214 244 216 245 215 177 177 177
683-
vde 254:64 0 512B 0 | 214 244 216 245 215 177 177 177
684-
vdf 254:80 0 512B 0 | 214 244 216 245 215 177 177 177`
680+
vdb 254:16 0 1073741824B 0 | 0 0 0 0 0 0 0 0
681+
vdc 254:32 0 512B 0 | 214 244 216 245 215 177 177 177
682+
vdd 254:48 0 512B 0 | 214 244 216 245 215 177 177 177
683+
vde 254:64 0 512B 0 | 214 244 216 245 215 177 177 177
684+
vdf 254:80 0 512B 0 | 214 244 216 245 215 177 177 177`
685685

686686
parts := strings.Split(stdout.String(), "vdb")
687687
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)