Skip to content

Commit 7b262fe

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 79eaa1b commit 7b262fe

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

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

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