mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ci: Extend vhost-user-blk test to validate the content
This commit extends the existing integration test related to vhost-user-blk by validating the block image contains one file "foo" containing "bar". Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
6b06cec611
commit
0a229ef4f5
@@ -96,10 +96,17 @@ if [ ! -f "$VIRTIOFSD" ] || [ ! -f "$VUBRIDGE" ] || [ ! -f "$VUBD" ]; then
|
||||
popd
|
||||
fi
|
||||
|
||||
BLKFILE="$WORKLOADS_DIR/blk"
|
||||
if [ ! -f "$BLKFILE" ]; then
|
||||
BLK_IMAGE="$WORKLOADS_DIR/blk.img"
|
||||
MNT_DIR="mount_image"
|
||||
if [ ! -f "$BLK_IMAGE" ]; then
|
||||
pushd $WORKLOADS_DIR
|
||||
dd if=/dev/zero of=$BLKFILE bs=1M count=64
|
||||
fallocate -l 16M $BLK_IMAGE
|
||||
mkfs.ext4 -j $BLK_IMAGE
|
||||
mkdir $MNT_DIR
|
||||
sudo mount -t ext4 $BLK_IMAGE $MNT_DIR
|
||||
sudo bash -c "echo bar > $MNT_DIR/foo"
|
||||
sudo umount $BLK_IMAGE
|
||||
rm -r $MNT_DIR
|
||||
popd
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user