[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: t1100-busy-label: don't use mkpartfs; rework to use scsi_
From: |
Jim Meyering |
Subject: |
[PATCH] tests: t1100-busy-label: don't use mkpartfs; rework to use scsi_debug |
Date: |
Fri, 27 May 2011 12:30:02 +0200 |
There was one remaining use of mkpartfs in tests/.
This removes it and revamps the offending test to
use the scsi_debug module, so that it will now
be run when "make check" is run as root.
>From 0bb7d21ba6289f5aa9114ae3b4cd844c7debc07f Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 27 May 2011 11:56:11 +0200
Subject: [PATCH] tests: t1100-busy-label: don't use mkpartfs; rework to use
scsi_debug
* tests/t1100-busy-label.sh: Remove one last use of mkpartfs.
Use scsi_debug rather than requiring an explicitly-provided device.
---
tests/t1100-busy-label.sh | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/t1100-busy-label.sh b/tests/t1100-busy-label.sh
index 4f190aa..9d230a8 100755
--- a/tests/t1100-busy-label.sh
+++ b/tests/t1100-busy-label.sh
@@ -17,17 +17,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../parted
-require_erasable_
require_root_
-require_512_byte_sector_size_
+require_scsi_debug_module_
+ss=$sector_size_
-dev=$DEVICE_TO_ERASE
+scsi_debug_setup_ sector_size=$ss dev_size_mb=40 > dev-name ||
+ skip_ 'failed to create scsi_debug device'
+dev=$(cat dev-name)
-# setup: create a fat32 file system on $dev
-dd if=/dev/zero "of=$dev" bs=1k count=1 2> /dev/null || fail=1
-parted -s "$dev" mklabel msdos > out 2>&1 || fail=1
-parted -s "$dev" mkpartfs primary fat32 1 40 >> out 2>&1 || fail=1
+parted -s "$dev" mklabel msdos mkpart primary fat32 1 40 > out 2>&1 || fail=1
compare out /dev/null || fail=1
+mkfs.vfat ${dev}1 || skip_ "mkfs.vfat failed"
mount_point="`pwd`/mnt"
--
1.7.5.2.660.g9f46c
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: t1100-busy-label: don't use mkpartfs; rework to use scsi_debug,
Jim Meyering <=