From 70368287e0d8ab3e7b92c732bfccb0a613009a63 Mon Sep 17 00:00:00 2001 From: anton Date: Tue, 10 Oct 2023 18:17:25 +0000 Subject: [PATCH] Make it possible to run fileops tests in parallel by making use of a unique mount point and vnd device. --- regress/sys/fileops/Makefile.inc | 16 ++++++++-------- regress/sys/fileops/ext2/Makefile | 3 ++- regress/sys/fileops/ffs/Makefile | 3 ++- regress/sys/fileops/msdos16/Makefile | 3 ++- regress/sys/fileops/msdos32/Makefile | 3 ++- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/regress/sys/fileops/Makefile.inc b/regress/sys/fileops/Makefile.inc index 1dab209fff4..5a898f929c4 100644 --- a/regress/sys/fileops/Makefile.inc +++ b/regress/sys/fileops/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.4 2020/12/16 21:49:20 bluhm Exp $ +# $OpenBSD: Makefile.inc,v 1.5 2023/10/10 18:17:25 anton Exp $ PERL_REQUIRE != perl -e 'eval { require File::Slurp } or print $$@' @@ -6,9 +6,9 @@ TESTS1= create read mmap TESTS2= many_files_root many_files_subdir file_write TESTS= ${TESTS1} ${TESTS2} -FILEOPS_MNT= /mnt/regress-fileops +FILEOPS_MNT= /mnt/regress-fileops-${FS} FILEOPS_PROG= ${.OBJDIR}/../fileops -CLEANFILES= diskimage +CLEANFILES= diskimage vnd .poison !defined (MOUNT) .poison !defined (NEWFS) @@ -17,13 +17,13 @@ CLEANFILES= diskimage disk: unconfig dd if=/dev/urandom of=diskimage bs=1M count=64 - vnconfig vnd0 diskimage - ${NEWFS} /dev/rvnd0c + vnconfig diskimage >vnd + ${NEWFS} /dev/r$$(/dev/null || true + -umount -f /dev/$$(/dev/null || true -rmdir ${FILEOPS_MNT} 2>/dev/null || true - -vnconfig -u vnd0 2>/dev/null || true + -vnconfig -u $$(/dev/null || true rm -f stamp-setup ${.OBJDIR}/../fileops: diff --git a/regress/sys/fileops/ext2/Makefile b/regress/sys/fileops/ext2/Makefile index 06eff6950d3..8de8a3f74d1 100644 --- a/regress/sys/fileops/ext2/Makefile +++ b/regress/sys/fileops/ext2/Makefile @@ -1,5 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2017/05/30 08:44:58 sf Exp $ +# $OpenBSD: Makefile,v 1.2 2023/10/10 18:17:25 anton Exp $ +FS = ext2 NEWFS = newfs_ext2fs -I MOUNT = mount_ext2fs diff --git a/regress/sys/fileops/ffs/Makefile b/regress/sys/fileops/ffs/Makefile index abcbb411389..36825886e00 100644 --- a/regress/sys/fileops/ffs/Makefile +++ b/regress/sys/fileops/ffs/Makefile @@ -1,5 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2017/05/29 11:01:16 sf Exp $ +# $OpenBSD: Makefile,v 1.2 2023/10/10 18:17:25 anton Exp $ +FS = ffs NEWFS = newfs MOUNT = mount diff --git a/regress/sys/fileops/msdos16/Makefile b/regress/sys/fileops/msdos16/Makefile index ecb1347f237..ef626f993c9 100644 --- a/regress/sys/fileops/msdos16/Makefile +++ b/regress/sys/fileops/msdos16/Makefile @@ -1,5 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2017/05/29 11:01:16 sf Exp $ +# $OpenBSD: Makefile,v 1.2 2023/10/10 18:17:25 anton Exp $ +FS = msdos16 NEWFS = newfs_msdos -F 16 MOUNT = mount_msdos diff --git a/regress/sys/fileops/msdos32/Makefile b/regress/sys/fileops/msdos32/Makefile index 459ce821ee7..a8988637c27 100644 --- a/regress/sys/fileops/msdos32/Makefile +++ b/regress/sys/fileops/msdos32/Makefile @@ -1,5 +1,6 @@ -# $OpenBSD: Makefile,v 1.2 2021/07/14 18:23:11 bluhm Exp $ +# $OpenBSD: Makefile,v 1.3 2023/10/10 18:17:26 anton Exp $ +FS = msdos32 NEWFS = newfs_msdos -F 32 -c 1 MOUNT = mount_msdos -- 2.20.1