resize_test.sh (226729) | resize_test.sh (293436) |
---|---|
1#! /bin/sh 2# 3# $FreeBSD: head/tools/regression/geom_eli/resize.t 226729 2011-10-25 13:41:12Z pjd $ | 1#!/bin/sh 2# $FreeBSD: head/tools/regression/geom_eli/resize.t 293436 2016-01-08 19:38:59Z ngie $ |
4 | 3 |
4. $(dirname $0)/conf.sh 5 |
|
5echo 1..27 6 7BLK=512 8BLKS_PER_MB=2048 9 10md=$(mdconfig -s40m) || exit 1 11unit=${md#md} 12i=1 --- 4 unchanged lines hidden (view full) --- 17 { 18 echo a: $(($partszMB * $BLKS_PER_MB)) 0 4.2BSD 1024 8192 19 echo c: $(($unitszMB * $BLKS_PER_MB)) 0 unused 0 0 20 } | disklabel -R $md /dev/stdin 21} 22 23# Initialise 24 | 6echo 1..27 7 8BLK=512 9BLKS_PER_MB=2048 10 11md=$(mdconfig -s40m) || exit 1 12unit=${md#md} 13i=1 --- 4 unchanged lines hidden (view full) --- 18 { 19 echo a: $(($partszMB * $BLKS_PER_MB)) 0 4.2BSD 1024 8192 20 echo c: $(($unitszMB * $BLKS_PER_MB)) 0 unused 0 0 21 } | disklabel -R $md /dev/stdin 22} 23 24# Initialise 25 |
25kldload geom_eli >/dev/null 2>&1 26 | |
27setsize 10 40 || echo -n "not " 28echo ok $i - "Sized ${md}a to 10m" 29i=$((i + 1)) 30 31echo secret >tmp.key 32geli init -Bnone -PKtmp.key ${md}a || echo -n "not " 33echo ok $i - "Initialised geli on ${md}a" 34i=$((i + 1)) --- 105 unchanged lines hidden (view full) --- 140geli resize -s 20m ${md}p1 || echo -n "not " 141echo ok $i - "Resized geli on ${md}p1 to 30m" 142i=$((i + 1)) 143geli attach -k tmp.key -p ${md}p1 || echo -n "not " 144echo ok $i - "Attached ${md}p1.eli" 145i=$((i + 1)) 146 147geli detach ${md}p1.eli | 26setsize 10 40 || echo -n "not " 27echo ok $i - "Sized ${md}a to 10m" 28i=$((i + 1)) 29 30echo secret >tmp.key 31geli init -Bnone -PKtmp.key ${md}a || echo -n "not " 32echo ok $i - "Initialised geli on ${md}a" 33i=$((i + 1)) --- 105 unchanged lines hidden (view full) --- 139geli resize -s 20m ${md}p1 || echo -n "not " 140echo ok $i - "Resized geli on ${md}p1 to 30m" 141i=$((i + 1)) 142geli attach -k tmp.key -p ${md}p1 || echo -n "not " 143echo ok $i - "Attached ${md}p1.eli" 144i=$((i + 1)) 145 146geli detach ${md}p1.eli |
148mdconfig -du$unit | |
149 150rm tmp.* | 147 148rm tmp.* |