From b3a4996943bf2ccf066c455b295122a190c9f5d7 Mon Sep 17 00:00:00 2001 From: hannken Date: Sun, 28 May 2023 08:17:00 +0000 Subject: [PATCH] Add RUMPHIJACK option "blanket=/DEV" so mount_ffs may canonicalise and mount the device path. Cannot use "/rump/DEV" here as the device path is embedded in "struct ufs_args" where it doesnt get hijacked. --- tests/fs/nfs/t_rquotad.sh | 5 +++-- tests/lib/librumphijack/t_tcpip.sh | 5 +++-- tests/lib/librumphijack/t_vfs.sh | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/fs/nfs/t_rquotad.sh b/tests/fs/nfs/t_rquotad.sh index 8314eef52f45..05cd8e0e240c 100644 --- a/tests/fs/nfs/t_rquotad.sh +++ b/tests/fs/nfs/t_rquotad.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_rquotad.sh,v 1.9 2020/08/20 13:58:30 riastradh Exp $ +# $NetBSD: t_rquotad.sh,v 1.10 2023/05/28 08:17:00 hannken Exp $ # # Copyright (c) 2011 Manuel Bouyer # All rights reserved. @@ -110,7 +110,8 @@ get_nfs_quota() /bin/echo "/export -noresvport -noresvmnt 10.1.1.100" | \ dd of=/rump/etc/exports 2> /dev/null - atf_check -s exit:0 -e ignore mount_ffs /dk /rump/export + atf_check -s exit:0 -e ignore env RUMPHIJACK='path=/rump,blanket=/dk' \ + mount_ffs /dk /rump/export #set a quota limit (and check that we can read it back) for q in ${expect} ; do diff --git a/tests/lib/librumphijack/t_tcpip.sh b/tests/lib/librumphijack/t_tcpip.sh index 2712ea16c229..03ae43ba10e1 100644 --- a/tests/lib/librumphijack/t_tcpip.sh +++ b/tests/lib/librumphijack/t_tcpip.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_tcpip.sh,v 1.21 2021/11/11 07:38:21 gson Exp $ +# $NetBSD: t_tcpip.sh,v 1.22 2023/05/28 08:17:00 hannken Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -182,7 +182,8 @@ test_nfs() atf_check -s exit:0 rump.sysctl -q -w kern.module.autoload=1 - atf_check -s exit:0 -e ignore mount_ffs /dk /rump/export + atf_check -s exit:0 -e ignore env RUMPHIJACK='path=/rump,blanket=/dk' \ + mount_ffs /dk /rump/export atf_check -s exit:0 -x "echo ${magicstr} > /rump/export/im_alive" # start rpcbind. we want /var/run/rpcbind.sock diff --git a/tests/lib/librumphijack/t_vfs.sh b/tests/lib/librumphijack/t_vfs.sh index c803e2a1974c..29c20676c60c 100644 --- a/tests/lib/librumphijack/t_vfs.sh +++ b/tests/lib/librumphijack/t_vfs.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_vfs.sh,v 1.6 2012/08/04 03:56:47 riastradh Exp $ +# $NetBSD: t_vfs.sh,v 1.7 2023/05/28 08:17:00 hannken Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -35,7 +35,8 @@ domount() mntdir=$1 [ $# -eq 0 ] && mntdir=/rump/mnt - atf_check -s exit:0 -e ignore mount_ffs /img ${mntdir} + atf_check -s exit:0 -e ignore env RUMPHIJACK='path=/rump,blanket=/img' \ + mount_ffs /img ${mntdir} } dounmount()