Module Name: src
Committed By: martin
Date: Tue Nov 29 20:06:24 UTC 2022
Modified Files:
src/tests/sbin/fsck_ffs: t_extattr.sh
Log Message:
Avoid dependence on details of the MD synthesized disklabel for
the vnd after mounting the single filesystem image.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/fsck_ffs/t_extattr.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/sbin/fsck_ffs/t_extattr.sh
diff -u src/tests/sbin/fsck_ffs/t_extattr.sh:1.2 src/tests/sbin/fsck_ffs/t_extattr.sh:1.3
--- src/tests/sbin/fsck_ffs/t_extattr.sh:1.2 Mon Nov 21 19:07:36 2022
+++ src/tests/sbin/fsck_ffs/t_extattr.sh Tue Nov 29 20:06:24 2022
@@ -1,4 +1,4 @@
-# $NetBSD: t_extattr.sh,v 1.2 2022/11/21 19:07:36 martin Exp $
+# $NetBSD: t_extattr.sh,v 1.3 2022/11/29 20:06:24 martin Exp $
#
# Copyright (c) 2021 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -25,9 +25,10 @@
# POSSIBILITY OF SUCH DAMAGE.
#
+rawpart=$( sysctl -n kern.rawpartition | tr '01234' 'abcde' )
VND=vnd0
-BDEV=/dev/${VND}a
-CDEV=/dev/r${VND}a
+BDEV=/dev/${VND}${rawpart}
+CDEV=/dev/r${VND}${rawpart}
IMG=fsimage
MNT=mnt
@@ -128,7 +129,7 @@ fsck_extattr_enable_corrupted_body()
fsck_ffs -y -c ea ${CDEV}
# Verify that the test file does not have the extattr.
- atf_check -o ignore fsck -n ${CDEV}
+ atf_check -o ignore fsck_ffs -n ${CDEV}
atf_check mount -t ffs ${BDEV} ${MNT}
atf_check -s exit:1 -e 'match:Attribute not found' \
getextattr user testname ${MNT}/file
@@ -167,7 +168,7 @@ fsck_extattr_disable_body()
fsck_ffs -y -c no-ea ${CDEV}
# Verify that the test file does not have the test extattr.
- atf_check -o ignore fsck -n ${CDEV}
+ atf_check -o ignore fsck_ffs -n ${CDEV}
atf_check mount -t ffs ${BDEV} ${MNT}
atf_check -s exit:1 -e 'match:getextattr: mnt/file: failed: Operation not supported' \
getextattr user testname ${MNT}/file
@@ -178,7 +179,7 @@ fsck_extattr_disable_body()
fsck_ffs -y -c ea ${CDEV}
# Verify that the test extattr is still gone.
- atf_check -o ignore fsck -n ${CDEV}
+ atf_check -o ignore fsck_ffs -n ${CDEV}
atf_check mount -t ffs ${BDEV} ${MNT}
atf_check -s exit:1 -e 'match:Attribute not found' \
getextattr user testname ${MNT}/file