[PATCH 2/4] tests: remove tests that are too FS-centric
Jim Meyering
meyering at redhat.com
Thu Sep 17 18:12:50 UTC 2009
* tests/t1000-mkpartfs.sh: Remove file.
* tests/t1500-small-ext2.sh: Likewise.
* tests/t2000-mkfs.sh: Likewise.
* tests/t3100-resize-ext2-partion.sh: Likewise.
* tests/t3000-constraints.sh: Likewise.
* tests/Makefile.am (TESTS): Remove them here, too.
---
tests/Makefile.am | 4 -
tests/t1000-mkpartfs.sh | 70 ----------------
tests/t1500-small-ext2.sh | 64 ---------------
tests/t2000-mkfs.sh | 152 ------------------------------=
------
tests/t3000-constraints.sh | 54 -------------
tests/t3100-resize-ext2-partion.sh | 55 -------------
6 files changed, 0 insertions(+), 399 deletions(-)
delete mode 100755 tests/t1000-mkpartfs.sh
delete mode 100755 tests/t1500-small-ext2.sh
delete mode 100755 tests/t2000-mkfs.sh
delete mode 100755 tests/t3000-constraints.sh
delete mode 100755 tests/t3100-resize-ext2-partion.sh
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 399653b..326ccb4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,14 +9,10 @@ TESTS =3D \
t0400-loop-clobber-infloop.sh \
t1000-mkpartfs.sh \
t1100-busy-label.sh \
- t1500-small-ext2.sh \
t1700-ext-probe.sh \
- t2000-mkfs.sh \
t2100-mkswap.sh \
t2200-dos-label-recog.sh \
t2300-dos-label-extended-bootcode.sh \
- t3000-constraints.sh \
- t3100-resize-ext2-partion.sh \
t4000-sun-raid-type.sh \
t4100-msdos-partition-limits.sh \
t4100-dvh-partition-limits.sh \
diff --git a/tests/t1000-mkpartfs.sh b/tests/t1000-mkpartfs.sh
deleted file mode 100755
index 96bb274..0000000
--- a/tests/t1000-mkpartfs.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-test_description=3D'Create some file systems using mkpartfs.'
-
-: ${srcdir=3D.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-N=3D500k
-dev=3Dloop-file
-test_expect_success \
- 'create a file too small to hold a fat32 file system' \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D$N 2> /dev/null'
-
-test_expect_success \
- 'label the test disk' \
- 'parted -s $dev mklabel msdos > out 2>&1'
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-# Expect parted's mkpartfs command to fail.
-test_expect_failure \
- 'try/fail to create a file system in too small a space' \
- 'parted -s $dev mkpartfs primary fat32 0 1 > out 2>&1'
-
-test_expect_success \
- 'create expected output file' \
- 'echo "Error: Partition too big/small for a fat32 file system." > ex=
p'
-
-test_expect_success \
- 'check for expected failure diagnostic' \
- 'compare out exp'
-
-test_expect_success 'clean up, preparing for next test' 'rm $dev out'
-
-#=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-# Similar, but with a file that's large enough, so mkpartfs succeeds.
-N=3D40M
-
-test_expect_success \
- 'create a file large enough to hold a fat32 file system' \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D$N 2> /dev/null'
-
-test_expect_success \
- 'label the test disk' \
- 'parted -s $dev mklabel msdos > out 2>&1'
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-test_expect_success \
- 'create an msdos file system' \
- 'parted -s $dev mkpartfs primary fat32 1 40 > out 2>&1'
-
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-test_done
diff --git a/tests/t1500-small-ext2.sh b/tests/t1500-small-ext2.sh
deleted file mode 100755
index c07d3f8..0000000
--- a/tests/t1500-small-ext2.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-test_description=3D'Create very small ext2 file systems.'
-
-: ${srcdir=3D.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-dev=3Dloop-file
-test_expect_success \
- 'setup' '
- dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D10M 2> /dev/null &&
- parted -s $dev mklabel msdos'
-
-test_expect_failure \
- 'try to create an ext2 partition that is one byte too small' '
- parted -s $dev mkpartfs primary ext2 10KB 29695B > out 2>&1'
-
-test_expect_success \
- 'check for expected diagnostic' '
- echo Error: File system too small for ext2. > exp &&
- compare out exp'
-
-test_expect_success \
- 'create the smallest ext2 partition' '
- parted -s $dev mkpartfs primary ext2 10KB 29696B > out 2>&1
- compare out /dev/null'
-
-# Restore $dev to initial state by writing 1KB of zeroes at the beginnin=
g.
-# Then relabel.
-test_expect_success \
- 'setup' '
- dd if=3D/dev/zero of=3D$dev bs=3D1K count=3D1 conv=3Dnotrunc 2> /dev=
/null &&
- parted -s $dev mklabel msdos'
-
-test_expect_success \
- 'create another ext2 file system (this would fail for parted-1.8.7)'=
'
- parted -s $dev mkpartfs primary ext2 2 10 > out 2>&1'
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-test_expect_success \
- 'create a smaller one; this would succeed for parted-1.8.7' '
- dd if=3D/dev/zero of=3D$dev bs=3D1K count=3D1 conv=3Dnotrunc 2> /dev=
/null &&
- parted -s $dev mklabel msdos &&
- parted -s $dev mkpartfs primary ext2 2 9 > out 2>&1'
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-test_done
diff --git a/tests/t2000-mkfs.sh b/tests/t2000-mkfs.sh
deleted file mode 100755
index faf80a7..0000000
--- a/tests/t2000-mkfs.sh
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-test_description=3D'Create some file systems using mkfs.'
-
-: ${srcdir=3D.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-N=3D40M
-dev=3Dloop-file
-test_expect_success \
- 'create a file large enough to hold a fat32 file system' \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D$N 2> /dev/null'
-
-test_expect_success \
- 'label the test disk' \
- 'parted -s $dev mklabel msdos > out 2>&1'
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-test_expect_success \
- 'create a partition' \
- 'parted -s $dev mkpart primary 1 40 > out 2>&1'
-
-test_expect_success \
- 'create an msdos file system' \
- 'parted -s $dev mkfs 1 fat32 > out 2>&1'
-
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-N=3D10M
-test_expect_success \
- 'create a file large enough to hold a fat32 file system' \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D$N 2> /dev/null'
-
-test_expect_success \
- 'label the test disk' \
- 'parted -s $dev mklabel msdos > out 2>&1'
-test_expect_success 'expect no output' 'compare out /dev/null'
-
-# test if can create a partition and a filesystem in the same session.
-fail=3D0
-cat <<EOF >in || fail=3D1
-mkpart
-primary
-ext2
-0
-10
-mkfs
-No
-quit
-EOF
-test_expect_success 'create input file' 'test $fail =3D 0'
-
-test_expect_success \
- 'create a partition and a filesystem in the same session' \
- 'parted ---pretend-input-tty $dev < in > out 2>&1'
-
-test_expect_success \
- 'normalize the actual output' \
- 'sed -n "s/.*\(Warning: The existing.*\)$/\1/p" out > out2'
-
-test_expect_success \
- 'check for expected prompt' \
- 'echo "Warning: The existing file system will be destroyed and all" =
\
- "data on the partition will be lost. Do you want to continue?" > =
exp &&
- compare out2 exp'
-
-#############################################################
-# Ensure that an invalid file system type elicits a diagnostic.
-# Before parted 1.8.8, this would fail silently.
-
-dev=3Dloop-file
-
-test_expect_success \
- "setup: create and label a device" \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D1M 2>/dev/null &&
- parted -s $dev mklabel msdos'
-
-test_expect_failure \
- 'try to create a file system with invalid type name' \
- 'parted -s $dev mkpartfs primary bogus 1 1 >out 2>&1'
-
-test_expect_success \
- 'normalize the actual output' \
- 'mv out o2 && sed -e "s,=0D *=0D,,;s, $,," \
- -e "s,^.*/lt-parted: ,parted: ," o2 > out'
-
-test_expect_success \
- 'check for expected diagnostic' \
- '{ echo "parted: invalid token: bogus"
- echo "Error: Expecting a file system type."; } > exp &&
- compare out exp'
-
-#############################################################
-# Demonstrate 3-block-group failure for 16+MB EXT2 file system.
-# This test would fail with parted-1.8.7.
-
-dev=3Dloop-file
-
-mkfs()
-{
- size=3D$1
- test_expect_success \
- "setup: create and label a device" \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D30M 2>/dev/null &&
- parted -s $dev mklabel gpt'
-
- test_expect_success \
- "try to create an ext2 file system of size $size" \
- 'parted -s $dev mkpartfs primary ext2 0 ${size}B >out 2>&1'
- test_expect_success 'check for empty output' 'compare out /dev/null'
-}
-
-
-# size in bytes #block groups last_group_blocks (in ext2_mkfs)
-mkfs 16795000 # 2 8191
-mkfs 16796000 # 2 8192
-mkfs 16796160 # 2 (was 3) 1
-mkfs 16797000 # 2 (was 3) 1
-mkfs 16798000 # 2 (was 3) 2
-# ...
-mkfs 17154000 # 2 (was 3) 350
-mkfs 17155000 # 2 (was 3) 351 last_group_admin =3D=3D last_grou=
p_blocks
-mkfs 17156000 # 2 (was 3) 352
-mkfs 17157000 # 3 353
-mkfs 17158000 # 3 354
-# ...
-mkfs 25184000 # 3 8192
-mkfs 25185000 # 3 (was 4) 1 (last_group_admin =3D 387)
-mkfs 25186000 # 3 (was 4) 2 (last_group_admin =3D 387)
-# ...
-mkfs 25589000 # 3 (was 4) 394 (last_group_admin =3D 394)
-mkfs 25589000 # 3 (was 4) 395 (last_group_admin =3D 394)
-mkfs 25590000 # 4 396
-
-test_done
diff --git a/tests/t3000-constraints.sh b/tests/t3000-constraints.sh
deleted file mode 100755
index 1673b09..0000000
--- a/tests/t3000-constraints.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2007-2009 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-test_description=3D"exercise Parted's constraint-management code"
-
-: ${srcdir=3D.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-dev=3Dloop-file
-N=3D2
-t=3Dext2
-
-test_expect_success \
- "setup: label and create a small $t partition" \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D${N}M 2>/dev/null &&
- { echo y; echo c; } > in &&
- { emit_superuser_warning
- echo "Warning: You requested a partition from 1000kB to 2000kB."
- echo "The closest location we can manage is 15.9kB to 15.9kB."
- echo "Is this still acceptable to you?"
- echo "Yes/No? y"
- echo "Error: File system too small for ext2."; } > exp &&
- parted -s $dev mklabel msdos &&
- parted -s $dev mkpartfs primary $t 1 $N'
-
-# Before parted-1.9, this would fail with a buffer overrun
-# leading to a segfault.
-test_expect_failure \
- 'try to create another partition in the same place' \
- 'parted ---pretend-input-tty $dev mkpartfs primary $t 1 $N <in >out =
2>&1'
-
-test_expect_success \
- 'normalize the actual output' \
- 'sed "s,=0D *=0D,,;s, $,," out > o2 && mv -f o2 out'
-
-test_expect_success 'check for expected output' 'compare out exp'
-
-test_done
diff --git a/tests/t3100-resize-ext2-partion.sh b/tests/t3100-resize-ext2=
-partion.sh
deleted file mode 100755
index d1f47d8..0000000
--- a/tests/t3100-resize-ext2-partion.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-# Exercise an EXT2-resizing bug.
-
-# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-test_description=3D'Exercise an EXT2-resize bug in at least 1.8.7'
-
-: ${srcdir=3D.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-dev=3Dloop-file
-# The "device size", $N, must be larger than $NEW_SIZE.
-N=3D1500M
-
-# To trigger the bug, the target size must be 269M or larger.
-NEW_SIZE=3D269M
-
-# $ORIG_SIZE may be just about anything smaller than $NEW_SIZE.
-ORIG_SIZE=3D1M
-
-test_expect_success \
- 'create the test file' \
- 'dd if=3D/dev/null of=3D$dev bs=3D1 seek=3D$N 2> /dev/null'
-
-test_expect_success \
- 'run parted -s FILE mklabel msdos' \
- 'parted -s $dev mklabel msdos > out 2>&1'
-test_expect_success 'check for empty output' 'compare out /dev/null'
-
-test_expect_success \
- 'make an ext2 primary partition' \
- 'parted -s $dev mkpartfs primary ext2 0 $ORIG_SIZE > out 2>&1'
-test_expect_success 'check for empty output' 'compare out /dev/null'
-
-test_expect_success \
- 'resize ext2 primary partition' \
- 'parted -s $dev resize 1 0 $NEW_SIZE > out 2>&1'
-test_expect_success 'check for empty output' 'compare out /dev/null'
-
-test_done
--=20
1.6.5.rc1.192.g63b0
More information about the parted-devel
mailing list