OSDN Git Service

tests: remove tests that are too FS-centric
authorJim Meyering <meyering@redhat.com>
Thu, 17 Sep 2009 18:12:50 +0000 (20:12 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 28 Oct 2009 14:48:24 +0000 (15:48 +0100)
* 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
tests/t1000-mkpartfs.sh [deleted file]
tests/t1500-small-ext2.sh [deleted file]
tests/t2000-mkfs.sh [deleted file]
tests/t3000-constraints.sh [deleted file]
tests/t3100-resize-ext2-partion.sh [deleted file]

index 0d393a6..e2078b9 100644 (file)
@@ -10,16 +10,11 @@ TESTS = \
   t0280-gpt-corrupt.sh \
   t0300-dos-on-gpt.sh \
   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 (executable)
index 96bb274..0000000
+++ /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='Create some file systems using mkpartfs.'
-
-: ${srcdir=.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-N=500k
-dev=loop-file
-test_expect_success \
-    'create a file too small to hold a fat32 file system' \
-    'dd if=/dev/null of=$dev bs=1 seek=$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." > exp'
-
-test_expect_success \
-    'check for expected failure diagnostic' \
-    'compare out exp'
-
-test_expect_success 'clean up, preparing for next test' 'rm $dev out'
-
-#====================================================================
-# Similar, but with a file that's large enough, so mkpartfs succeeds.
-N=40M
-
-test_expect_success \
-    'create a file large enough to hold a fat32 file system' \
-    'dd if=/dev/null of=$dev bs=1 seek=$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 (executable)
index c07d3f8..0000000
+++ /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='Create very small ext2 file systems.'
-
-: ${srcdir=.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-dev=loop-file
-test_expect_success \
-    'setup' '
-    dd if=/dev/null of=$dev bs=1 seek=10M 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 beginning.
-# Then relabel.
-test_expect_success \
-    'setup' '
-    dd if=/dev/zero of=$dev bs=1K count=1 conv=notrunc 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=/dev/zero of=$dev bs=1K count=1 conv=notrunc 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 (executable)
index faf80a7..0000000
+++ /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='Create some file systems using mkfs.'
-
-: ${srcdir=.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-N=40M
-dev=loop-file
-test_expect_success \
-    'create a file large enough to hold a fat32 file system' \
-    'dd if=/dev/null of=$dev bs=1 seek=$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=10M
-test_expect_success \
-    'create a file large enough to hold a fat32 file system' \
-    'dd if=/dev/null of=$dev bs=1 seek=$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=0
-cat <<EOF >in || fail=1
-mkpart
-primary
-ext2
-0
-10
-mkfs
-No
-quit
-EOF
-test_expect_success 'create input file' 'test $fail = 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=loop-file
-
-test_expect_success \
-    "setup: create and label a device" \
-    'dd if=/dev/null of=$dev bs=1 seek=1M 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,\r   *\r,,;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=loop-file
-
-mkfs()
-{
-  size=$1
-  test_expect_success \
-      "setup: create and label a device" \
-      'dd if=/dev/null of=$dev bs=1 seek=30M 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 == last_group_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 = 387)
-mkfs   25186000 #  3 (was 4)         2 (last_group_admin = 387)
-# ...
-mkfs   25589000 #  3 (was 4)       394 (last_group_admin = 394)
-mkfs   25589000 #  3 (was 4)       395 (last_group_admin = 394)
-mkfs   25590000 #  4               396
-
-test_done
diff --git a/tests/t3000-constraints.sh b/tests/t3000-constraints.sh
deleted file mode 100755 (executable)
index 1673b09..0000000
+++ /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="exercise Parted's constraint-management code"
-
-: ${srcdir=.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-dev=loop-file
-N=2
-t=ext2
-
-test_expect_success \
-    "setup: label and create a small $t partition" \
-    'dd if=/dev/null of=$dev bs=1 seek=${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,\r   *\r,,;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 (executable)
index d1f47d8..0000000
+++ /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='Exercise an EXT2-resize bug in at least 1.8.7'
-
-: ${srcdir=.}
-. $srcdir/test-lib.sh
-
-require_512_byte_sector_size_
-
-dev=loop-file
-# The "device size", $N, must be larger than $NEW_SIZE.
-N=1500M
-
-# To trigger the bug, the target size must be 269M or larger.
-NEW_SIZE=269M
-
-# $ORIG_SIZE may be just about anything smaller than $NEW_SIZE.
-ORIG_SIZE=1M
-
-test_expect_success \
-    'create the test file' \
-    'dd if=/dev/null of=$dev bs=1 seek=$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