Skip to contentSkip to conversation

xfstests: add 265 and 266 for multiple media files

PATCH New Bill Kendall 1 participant 1 message Oct 31, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: add 265 and 266 for multiple media files

This patch adds a couple of tests for xfsdump when multiple media files are used. 265 tests the case where a file is split across multiple media files, and 266 tests the case where a file ends on one media file and the next media file starts on another file. These tests use a small media file size (xfsdump -d) so that they don't rely on having to hit end-of-tape.

---
 265         |   75 ++++++++++++++++++++++++++++++++++++++++++++++++++
 265.out     |   88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 266         |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 266.out     |   86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 common.dump |    6 ++--
 group       |    2 +
 6 files changed, 332 insertions(+), 3 deletions(-)
 create mode 100755 265
 create mode 100644 265.out
 create mode 100755 266
 create mode 100644 266.out
265 new file +75 -0
new file mode 100755
index 0000000..65d773e
@@ -0,0 +1,75 @@
+#! /bin/bash
+# FS QA Test No. 265
+#
+# Test xfsdump with a file spanning multiple media files.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2011 SGI.  All Rights Reserved.
+#
+# 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.
+#
+# This program is distributed in the hope that it would 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, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+# creator
[email protected]
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=0	# success is the default!
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+#
+# create a 40 MiB file with an extended attr.
+# xfsdump writes file data in "extent groups", currently 16 MiB in size. After
+# writing an extent group or finishing a file, xfsdump will start a new media
+# file if it is over the suggested size. With a single 40 MiB file and using a
+# suggested media file size of 12 MiB below, this dump will be contained in 3
+# media files.
+#
+_create_files()
+{
+    cat <<End-of-File >$tmp.config
+# pathname	size            user    group    perm   name value namespace
+biggg		41943040	$nobody	$nobody  777    attr1 some_text1  root
+End-of-File
+
+    _wipe_fs
+    _do_create_dumpdir_fill
+    _stable_fs
+}
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.dump
+. ./common.attr
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
+_require_tape $TAPE_DEV
+_require_attrs
+
+_create_files
+_erase_hard
+_do_dump -d 12
+_do_restore
+_ls_compare_sub
+_diff_compare
+_diff_compare_eas
+
+# success, all done
+exit
265.out new file +88 -0

88 lines not on this page · raw message

266 new file +78 -0

78 lines not on this page · raw message

266.out new file +86 -0

86 lines not on this page · raw message

common.dump +3 -3
index d9e6565..3942e83 100644
@@ -909,9 +909,9 @@ _parse_args()
         -Q)
             do_quota_check=false
             ;;
-        -l)
-            [ -z "$2" ] && _fail "missing argument for -l"
-	    dump_args="$dump_args -l$2"
+        -l|-d)
+            [ -z "$2" ] && _fail "missing argument for $1"
+	    dump_args="$dump_args $1$2"
 	    shift
             ;;
 	*)
group +2 -0
index 70ea462..8a23320 100644
@@ -378,3 +378,5 @@ deprecated
 262 auto quick quota
 263 rw auto quick
 264 dump ioctl auto quick
+265 dump ioctl tape
+266 dump ioctl tape
Signature · 6 lines
1.7.0.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs