svn commit: r327353 - head/tests/sys/geom/class/eli

Alan Somers asomers at FreeBSD.org
Fri Dec 29 18:42:57 UTC 2017


Author: asomers
Date: Fri Dec 29 18:42:55 2017
New Revision: 327353
URL: https://svnweb.freebsd.org/changeset/base/327353

Log:
  geli: fix the resize test on arm64
  
  The resize test used bsdlabel(8), which is not available on all
  architectures.  Change it to use gpart(8) instead, which should be available
  everywhere.
  
  PR:		221763
  Reported by:	andrew
  MFC after:	2 weeks

Modified:
  head/tests/sys/geom/class/eli/resize_test.sh

Modified: head/tests/sys/geom/class/eli/resize_test.sh
==============================================================================
--- head/tests/sys/geom/class/eli/resize_test.sh	Fri Dec 29 18:09:06 2017	(r327352)
+++ head/tests/sys/geom/class/eli/resize_test.sh	Fri Dec 29 18:42:55 2017	(r327353)
@@ -25,17 +25,16 @@ fsck_md()
 }
 
 setsize() {
-    partszMB=$1 unitszMB=$2
+    partszMB=$1
 
-    {
-	echo a: $(($partszMB * $BLKS_PER_MB)) 0 4.2BSD 1024 8192
-	echo c: $(($unitszMB * $BLKS_PER_MB)) 0 unused 0 0
-    } | bsdlabel -R $md /dev/stdin
+    gpart resize -i 1 -s ${partszMB}m ${md}
 }
 
 # Initialise
 
-setsize 10 40 || echo -n "not "
+gpart create -s BSD ${md}
+gpart add -t freebsd-ufs -s 10m ${md}
+setsize 10 || echo -n "not "
 echo ok $i - "Sized ${md}a to 10m"
 i=$((i + 1))
 
@@ -63,7 +62,7 @@ geli detach ${md}a.eli || echo -n "not "
 echo ok $i - "Detached ${md}a.eli"
 i=$((i + 1))
 
-setsize 20 40 || echo -n "not "
+setsize 20 || echo -n "not "
 echo ok $i - "Sized ${md}a to 20m"
 i=$((i + 1))
 geli attach -pktmp.key ${md}a && echo -n "not "
@@ -93,7 +92,7 @@ geli detach ${md}a.eli || echo -n "not "
 echo ok $i - "Detached ${md}a.eli"
 i=$((i + 1))
 
-setsize 30 40 || echo -n "not "
+setsize 30 || echo -n "not "
 echo ok $i - "Sized ${md}a to 30m"
 i=$((i + 1))
 


More information about the svn-src-head mailing list