diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2017-02-13 09:32:28 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2017-02-13 10:06:19 +0100 |
commit | 2923d9e47deb11b28b8b753dd7862da186da051c (patch) | |
tree | 337bfc863027e36a110046c2f3f11c2acec6959c | |
parent | c3b1f1a07ac4931ee4b7b843741d8ec09d8eea5c (diff) | |
download | lvm2-2923d9e47deb11b28b8b753dd7862da186da051c.tar.gz |
tests: update
-rw-r--r-- | test/shell/thin-autoumount-dmeventd.sh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/shell/thin-autoumount-dmeventd.sh b/test/shell/thin-autoumount-dmeventd.sh index b2b20a5f4..5e1c2be8a 100644 --- a/test/shell/thin-autoumount-dmeventd.sh +++ b/test/shell/thin-autoumount-dmeventd.sh @@ -42,8 +42,6 @@ export MKE2FS_CONFIG="$TESTDIR/lib/mke2fs.conf" aux have_thin 1 0 0 || skip -aux lvmconf "dmeventd/thin_command = \"$PWD/testcmd.sh\"" - # Simple implementation of umount when lvextend fails cat <<- EOF >testcmd.sh #!/bin/sh @@ -54,26 +52,26 @@ echo "Metadata: \$DMEVENTD_THIN_POOL_METADATA" $TESTDIR/lib/lvextend --use-policies \$1 || { umount "$mntdir" || true umount "$mntusedir" || true - return 1 + return 0 } test \$($TESTDIR/lib/lvs -o selected -S "data_percent>95||metadata_percent>95" --noheadings \$1) -eq 0 || { umount "$mntdir" || true umount "$mntusedir" || true - return 1 + return 0 } EOF chmod +x testcmd.sh # Show prepared script cat testcmd.sh -aux prepare_dmeventd - # Use autoextend percent 0 - so extension fails and triggers umount... aux lvmconf "activation/thin_pool_autoextend_percent = 0" \ - "activation/thin_pool_autoextend_threshold = 70" + "activation/thin_pool_autoextend_threshold = 70" \ + "dmeventd/thin_command = \"/$PWD/testcmd.sh\"" -aux prepare_vg 2 +aux prepare_dmeventd +aux prepare_vg 2 lvcreate -L8M -V8M -n $lv1 -T $vg/pool lvcreate -V8M -n $lv2 -T $vg/pool @@ -85,8 +83,8 @@ lvchange --monitor y $vg/pool mkdir "$mntdir" "$mntusedir" trap 'cleanup_mounted_and_teardown' EXIT -mount "$DM_DEV_DIR/mapper/$vg-$lv1" "$mntdir" -mount "$DM_DEV_DIR/mapper/$vg-$lv2" "$mntusedir" +mount "$DM_DEV_DIR/$vg/$lv1" "$mntdir" +mount "$DM_DEV_DIR/$vg/$lv2" "$mntusedir" # Check both LVs are opened (~mounted) is_lv_opened_ "$vg/$lv1" |