From a151f7528f8a3d31f838ae96bd51ae2c6c467c44 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 30 Nov 2022 17:49:09 +0000 Subject: Unfortunately rump does not provide the same magic as MAKEDEV does for native /dev and create an alias for disk devices w/o partition latter pointing at the raw partition, so for rump based tests we actually have to calculate the concrete device name. Use an idiom suggested by kre for this which also works for ports that have kern.rawpartition > 4. --- tests/dev/raidframe/t_raid.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/dev/raidframe') diff --git a/tests/dev/raidframe/t_raid.sh b/tests/dev/raidframe/t_raid.sh index 52e38ff83b7..7f9d8bf04c1 100644 --- a/tests/dev/raidframe/t_raid.sh +++ b/tests/dev/raidframe/t_raid.sh @@ -1,5 +1,5 @@ #! /usr/bin/atf-sh -# $NetBSD: t_raid.sh,v 1.15 2020/11/30 05:33:32 msaitoh Exp $ +# $NetBSD: t_raid.sh,v 1.16 2022/11/30 17:49:09 martin Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -26,7 +26,8 @@ # POSSIBILITY OF SUCH DAMAGE. # -rawpart=`sysctl -n kern.rawpartition | tr '01234' 'abcde'` +rawpart=$( set -- a b c d e f g h i j k l m n o p q r s t u v w x y z; + shift $( sysctl -n kern.rawpartition ); printf %s "$1" ) rawraid=/dev/rraid0${rawpart} raidserver="rump_server -lrumpvfs -lrumpdev -lrumpdev_disk -lrumpdev_raidframe" -- cgit