Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
19
.gitignore
vendored
19
.gitignore
vendored
@ -1 +1,18 @@
|
|||||||
SOURCES/kvdo-c3fab42.tar.gz
|
/kvdo-36c3e1c.tar.gz
|
||||||
|
/kvdo-2e1a578.tar.gz
|
||||||
|
/kvdo-000a4c2.tar.gz
|
||||||
|
/kvdo-3f9bde5.tar.gz
|
||||||
|
/kvdo-f9d6d18.tar.gz
|
||||||
|
/kvdo-819203a.tar.gz
|
||||||
|
/kvdo-e209cfe.tar.gz
|
||||||
|
/kvdo-127a993.tar.gz
|
||||||
|
/kvdo-6077a12.tar.gz
|
||||||
|
/kvdo-883a960.tar.gz
|
||||||
|
/kvdo-e2a5ebb.tar.gz
|
||||||
|
/kvdo-c9bd224.tar.gz
|
||||||
|
/kvdo-c6254c6.tar.gz
|
||||||
|
/kvdo-9b37ab4.tar.gz
|
||||||
|
/kvdo-7c54552.tar.gz
|
||||||
|
/kvdo-e58f053.tar.gz
|
||||||
|
/kvdo-2ede754.tar.gz
|
||||||
|
/kvdo-bc83d8b.tar.gz
|
||||||
|
|||||||
1056
SPECS/kmod-kvdo.spec
1056
SPECS/kmod-kvdo.spec
File diff suppressed because it is too large
Load Diff
1193
add_lz4_dependency.patch
Normal file
1193
add_lz4_dependency.patch
Normal file
File diff suppressed because it is too large
Load Diff
15
fix_the_build.patch
Normal file
15
fix_the_build.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -Naur kvdo-e58f053ed24c46e72c5b7ad7ff029d50c11e7dc3.orig/vdo/dm-vdo-target.c kvdo-e58f053ed24c46e72c5b7ad7ff029d50c11e7dc3/vdo/dm-vdo-target.c
|
||||||
|
--- kvdo-e58f053ed24c46e72c5b7ad7ff029d50c11e7dc3.orig/vdo/dm-vdo-target.c 2024-11-06 11:18:49.000000000 -0500
|
||||||
|
+++ kvdo-e58f053ed24c46e72c5b7ad7ff029d50c11e7dc3/vdo/dm-vdo-target.c 2025-01-17 10:47:04.527655244 -0500
|
||||||
|
@@ -73,9 +73,9 @@
|
||||||
|
limits->physical_block_size = VDO_BLOCK_SIZE;
|
||||||
|
|
||||||
|
/* The minimum io size for random io */
|
||||||
|
- blk_limits_io_min(limits, VDO_BLOCK_SIZE);
|
||||||
|
+ limits->io_min = VDO_BLOCK_SIZE;
|
||||||
|
/* The optimal io size for streamed/sequential io */
|
||||||
|
- blk_limits_io_opt(limits, VDO_BLOCK_SIZE);
|
||||||
|
+ limits->io_opt = VDO_BLOCK_SIZE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sets the maximum discard size that will be passed into VDO. This
|
||||||
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
--- !Policy
|
||||||
|
product_versions:
|
||||||
|
- rhel-9
|
||||||
|
decision_context: osci_compose_gate
|
||||||
|
rules:
|
||||||
|
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||||
1001
kmod-kvdo.spec
Normal file
1001
kmod-kvdo.spec
Normal file
File diff suppressed because it is too large
Load Diff
34
removed-logical-space-check-from-table-line.patch
Normal file
34
removed-logical-space-check-from-table-line.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 8fb4ef85097e7b46cb3604612a49e480efd4465a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrew Walsh <awalsh@redhat.com>
|
||||||
|
Date: Wed, 24 Aug 2022 12:00:12 -0400
|
||||||
|
Subject: [PATCH] Removed logical space check from table line.
|
||||||
|
|
||||||
|
Until the LVM tooling can be updated to use accurate sizes, this check
|
||||||
|
can't be implemented.
|
||||||
|
|
||||||
|
Signed-off-by: Andrew Walsh <awalsh@redhat.com>
|
||||||
|
---
|
||||||
|
vdo/vdo-component.c | 7 -------
|
||||||
|
1 file changed, 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/vdo/vdo-component.c b/vdo/vdo-component.c
|
||||||
|
index ac1ac1f7..50ba438b 100644
|
||||||
|
--- a/vdo/vdo-component.c
|
||||||
|
+++ b/vdo/vdo-component.c
|
||||||
|
@@ -303,13 +303,6 @@ int vdo_validate_config(const struct vdo_config *config,
|
||||||
|
if (result != UDS_SUCCESS) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- if (logical_block_count != config->logical_blocks) {
|
||||||
|
- uds_log_error("A logical size of %llu blocks was specified, but that differs from the %llu blocks configured in the vdo super block",
|
||||||
|
- (unsigned long long) logical_block_count,
|
||||||
|
- (unsigned long long) config->logical_blocks);
|
||||||
|
- return VDO_PARAMETER_MISMATCH;
|
||||||
|
- }
|
||||||
|
}
|
||||||
|
|
||||||
|
result = ASSERT(config->logical_blocks <= MAXIMUM_VDO_LOGICAL_BLOCKS,
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
|||||||
|
SHA512 (kvdo-bc83d8b.tar.gz) = e111cef4c0db9084d91f835c638df32def09c9abe99e49a8238fd2b51b622b4b6940ceb8a15676750ff4b3d847b7c8a850fd8e2060c2896682e0b65fd2c06201
|
||||||
1
tests/.fmf/version
Normal file
1
tests/.fmf/version
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
||||||
4
tests/provision.fmf
Normal file
4
tests/provision.fmf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
standard-inventory-qcow2:
|
||||||
|
qemu:
|
||||||
|
m: 4G
|
||||||
62
tests/sanity/Makefile
Normal file
62
tests/sanity/Makefile
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /kernel/test_beakertask/Sanity/beaker_test
|
||||||
|
# Description: Install VDO
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 2 of
|
||||||
|
# the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/beaker_test
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Andy Walsh <awalsh@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Loads VDO kernel modules" >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 5m" >> $(METADATA)
|
||||||
|
@echo "RunFor: test_beakertask" >> $(METADATA)
|
||||||
|
@echo "Requires: test_beakertask" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2+" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
||||||
3
tests/sanity/PURPOSE
Normal file
3
tests/sanity/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE Test the kmod-kvdo packaged drivers
|
||||||
|
Description: Load the VDO modules into the kernel.
|
||||||
|
Author: Andy Walsh <awalsh@redhat.com>
|
||||||
57
tests/sanity/runtest.sh
Normal file
57
tests/sanity/runtest.sh
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of kmod-kvdo/sanity
|
||||||
|
# Description: Checking that the kmod-kvdo kernel modules can be loaded.
|
||||||
|
# Author: Andy Walsh <awalsh@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 2 of
|
||||||
|
# the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/bin/rhts-environment.sh || exit 1
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
# Collect information
|
||||||
|
rlLog "uname: $(uname -a)"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Confirm kvdo module is installed"
|
||||||
|
rlRun "find /lib/modules -type f -name kvdo.ko"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Validate module information"
|
||||||
|
rlRun "modinfo -l kvdo"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Confirm the kvdo module can be loaded"
|
||||||
|
rlRun "modprobe kvdo"
|
||||||
|
rlRun "lsmod | grep kvdo"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup "Unload the kvdo module"
|
||||||
|
rlRun "modprobe -r kvdo"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
|
|
||||||
62
tests/smoke/Makefile
Normal file
62
tests/smoke/Makefile
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Makefile of /kernel/test_beakertask/Sanity/beaker_test
|
||||||
|
# Description: Install VDO
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 2 of
|
||||||
|
# the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
export TEST=/beaker_test
|
||||||
|
export TESTVERSION=1.0
|
||||||
|
|
||||||
|
BUILT_FILES=
|
||||||
|
|
||||||
|
FILES=$(METADATA) runtest.sh Makefile PURPOSE
|
||||||
|
|
||||||
|
.PHONY: all install download clean
|
||||||
|
|
||||||
|
run: $(FILES) build
|
||||||
|
./runtest.sh
|
||||||
|
|
||||||
|
build: $(BUILT_FILES)
|
||||||
|
test -x runtest.sh || chmod a+x runtest.sh
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ $(BUILT_FILES)
|
||||||
|
|
||||||
|
|
||||||
|
include /usr/share/rhts/lib/rhts-make.include
|
||||||
|
|
||||||
|
$(METADATA): Makefile
|
||||||
|
@echo "Owner: Andy Walsh <awalsh@redhat.com>" > $(METADATA)
|
||||||
|
@echo "Name: $(TEST)" >> $(METADATA)
|
||||||
|
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||||
|
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||||
|
@echo "Description: Installs VDO" >> $(METADATA)
|
||||||
|
@echo "Type: Sanity" >> $(METADATA)
|
||||||
|
@echo "TestTime: 5m" >> $(METADATA)
|
||||||
|
@echo "RunFor: test_beakertask" >> $(METADATA)
|
||||||
|
@echo "Requires: test_beakertask" >> $(METADATA)
|
||||||
|
@echo "Priority: Normal" >> $(METADATA)
|
||||||
|
@echo "License: GPLv2+" >> $(METADATA)
|
||||||
|
@echo "Confidential: no" >> $(METADATA)
|
||||||
|
@echo "Destructive: no" >> $(METADATA)
|
||||||
|
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
|
||||||
|
|
||||||
|
rhts-lint $(METADATA)
|
||||||
3
tests/smoke/PURPOSE
Normal file
3
tests/smoke/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
PURPOSE Test the kmod-kvdo package for basic functionality
|
||||||
|
Description: Tests the VDO software for basic functionality.
|
||||||
|
Author: Andy Walsh <awalsh@redhat.com>
|
||||||
170
tests/smoke/runtest.sh
Normal file
170
tests/smoke/runtest.sh
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of VDO smoke test
|
||||||
|
# Description: Check that VDO is able to read/write data and start/stop
|
||||||
|
# Author: Andy Walsh <awalsh@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2018 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 2 of
|
||||||
|
# the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/bin/rhts-environment.sh || exit 1
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
function insertModuleWithDMesgOutput() {
|
||||||
|
moduleName=$1
|
||||||
|
|
||||||
|
modulePath=$(rpm -ql kmod-kvdo | grep "${1}.ko$")
|
||||||
|
|
||||||
|
exitVal=0
|
||||||
|
rlRun "dmesg -c > /dev/null"
|
||||||
|
rlRun "insmod ${modulePath}" || exitVal=255
|
||||||
|
rlRun "dmesg"
|
||||||
|
|
||||||
|
if [ ${exitVal} -ne 0 ]; then
|
||||||
|
rlDie "Exiting with failure due to module/kernel incompatibility"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
|
||||||
|
rlPhaseStartSetup "Create backing device"
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlRun "df ."
|
||||||
|
|
||||||
|
# If we end up with less than 15G of available space, then we can't
|
||||||
|
# create a VDO volume sufficient for testing. We should bail out as a
|
||||||
|
# result.
|
||||||
|
loopbackSize=$(($(df --sync --output=avail / | tail -1) * 1024 - 1024*1024*1024))
|
||||||
|
if [ ${loopbackSize} -lt $((1024*1024*1024*15)) ]; then
|
||||||
|
rlDie "Not enough space to create loopback device."
|
||||||
|
fi
|
||||||
|
rlRun "truncate -s ${loopbackSize} $TmpDir/loop0.bin" 0 "Laying out loopfile backing"
|
||||||
|
rlRun "losetup /dev/loop0 $TmpDir/loop0.bin" 0 "Creating loopdevice"
|
||||||
|
rlRun "mkdir -p /mnt/testmount" 0 "Creating test mountpoint dir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Gather Relevant Info"
|
||||||
|
# Gather some system information for debug purposes
|
||||||
|
rlRun "uname -a"
|
||||||
|
rlRun "find /lib/modules -name kvdo.ko"
|
||||||
|
rlRun "modinfo kvdo" || insertModuleWithDMesgOutput kvdo
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "Generate Test Data"
|
||||||
|
# Write some data, check statistics
|
||||||
|
rlRun "dd if=/dev/urandom of=${TmpDir}/urandom_fill_file bs=1M count=100"
|
||||||
|
rlRun "ls -lh ${TmpDir}/urandom_fill_file"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
for partition_type in "raw" "lvm"
|
||||||
|
do
|
||||||
|
case $partition_type in
|
||||||
|
"raw"*)
|
||||||
|
backing_device=/dev/loop0
|
||||||
|
;;
|
||||||
|
"lvm"*)
|
||||||
|
rlPhaseStartTest "Create LVM backing device"
|
||||||
|
rlRun "pvcreate /dev/loop0" 0 "Creating PV"
|
||||||
|
rlRun "vgcreate vdo_base /dev/loop0" 0 "Creating VG"
|
||||||
|
rlRun "lvcreate -n vdo_base -l100%FREE vdo_base" 0 "Creating LV"
|
||||||
|
rlPhaseEnd
|
||||||
|
backing_device=/dev/vdo_base/vdo_base
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rlPhaseStartTest "LVM-VDO Smoke Test"
|
||||||
|
# Create the VDO volume and get the initial statistics
|
||||||
|
rlRun "pvcreate --config devices/scan_lvs=1 ${backing_device}"
|
||||||
|
rlRun "vgcreate --config devices/scan_lvs=1 vdo_data ${backing_device}"
|
||||||
|
rlRun "lvcreate --config devices/scan_lvs=1 --type vdo -L 9G -V 100G -n vdo0 vdo_data/vdopool"
|
||||||
|
|
||||||
|
# Create a filesystem and mount the device, check statistics
|
||||||
|
rlRun "mkfs.xfs -K /dev/vdo_data/vdo0" 0 "Making xfs filesystem on VDO volume"
|
||||||
|
rlRun "mount -o discard /dev/vdo_data/vdo0 /mnt/testmount" 0 "Mounting xfs filesystem on VDO volume"
|
||||||
|
rlRun "df --sync /mnt/testmount"
|
||||||
|
rlRun "vdostats vdo_data-vdopool-vpool"
|
||||||
|
|
||||||
|
# Copy the test data onto VDO volume 4 times to get some deduplication
|
||||||
|
for i in {1..4}
|
||||||
|
do
|
||||||
|
rlRun "cp ${TmpDir}/urandom_fill_file /mnt/testmount/test_file-${i}"
|
||||||
|
done
|
||||||
|
rlRun "df --sync /mnt/testmount"
|
||||||
|
rlRun "vdostats vdo_data-vdopool-vpool"
|
||||||
|
|
||||||
|
# Verify the data
|
||||||
|
for i in {1..4}
|
||||||
|
do
|
||||||
|
rlRun "cmp ${TmpDir}/urandom_fill_file /mnt/testmount/test_file-${i}"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Unmount and stop the volume, check statistics
|
||||||
|
rlRun "umount /mnt/testmount" 0 "Unmounting testmount"
|
||||||
|
rlRun "vdostats vdo_data-vdopool-vpool"
|
||||||
|
rlRun "lvchange --config devices/scan_lvs=1 -an vdo_data/vdo0"
|
||||||
|
|
||||||
|
# Start the VDO volume, mount it, check statistics, verify data.
|
||||||
|
rlRun "lvchange --config devices/scan_lvs=1 -ay vdo_data/vdo0"
|
||||||
|
rlRun "mount -o discard /dev/vdo_data/vdo0 /mnt/testmount" 0 "Mounting xfs filesystem on VDO volume"
|
||||||
|
|
||||||
|
rlRun "df --sync /mnt/testmount"
|
||||||
|
rlRun "vdostats vdo_data-vdopool-vpool"
|
||||||
|
|
||||||
|
# Verify the data
|
||||||
|
for i in {1..4}
|
||||||
|
do
|
||||||
|
rlRun "cmp ${TmpDir}/urandom_fill_file /mnt/testmount/test_file-${i}"
|
||||||
|
done
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "umount /mnt/testmount" 0 "Unmounting testmount"
|
||||||
|
rlRun "lvremove --config devices/scan_lvs=1 -ff vdo_data/vdo0" 0 "Removing VDO volume vdo0"
|
||||||
|
case $partition_type in
|
||||||
|
"lvm"*)
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "lvremove -ff ${backing_device}" 0 "Removing LV"
|
||||||
|
rlRun "vgremove vdo_base" 0 "Removing VG"
|
||||||
|
rlRun "pvremove /dev/loop0" 0 "Removing PV"
|
||||||
|
rlPhaseEnd
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
rlRun "dd if=/dev/zero of=/dev/loop0 bs=1M count=10 oflag=direct" 0 "Wiping Block Device"
|
||||||
|
|
||||||
|
rlPhaseEnd
|
||||||
|
done
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "losetup -d /dev/loop0" 0 "Deleting loopdevice"
|
||||||
|
rlRun "rm -f $TmpDir/loop0.bin" 0 "Removing loopfile backing"
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
16
tests/tests.yml
Normal file
16
tests/tests.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
tags:
|
||||||
|
- classic
|
||||||
|
roles:
|
||||||
|
- role: standard-test-beakerlib
|
||||||
|
tests:
|
||||||
|
- sanity
|
||||||
|
- smoke
|
||||||
|
required_packages:
|
||||||
|
- vdo
|
||||||
|
- device-mapper-event
|
||||||
|
- device-mapper-event-libs
|
||||||
|
- device-mapper-persistent-data
|
||||||
|
- libaio
|
||||||
|
- lvm2
|
||||||
|
- lvm2-libs
|
||||||
Loading…
Reference in New Issue
Block a user