mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Test remote dumping with a user specified as well.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#! /bin/sh
|
||||
# XFS QA Test No. 039
|
||||
# $Id: 1.1 $
|
||||
#
|
||||
# Test xfsdump/restore to a remote IRIX tape using RMT user
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms of version 2 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.
|
||||
#
|
||||
# Further, this software is distributed without any warranty that it is
|
||||
# free of the rightful claim of any third person regarding infringement
|
||||
# or the like. Any license provided herein, whether implied or
|
||||
# otherwise, applies only to this software file. Patent licenses, if
|
||||
# any, provided herein do not apply to combinations of this program with
|
||||
# other software, or any other product whatsoever.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write the Free Software Foundation, Inc., 59
|
||||
# Temple Place - Suite 330, Boston MA 02111-1307, USA.
|
||||
#
|
||||
# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
|
||||
# Mountain View, CA 94043, or:
|
||||
#
|
||||
# http://www.sgi.com
|
||||
#
|
||||
# For further information regarding this notice, see:
|
||||
#
|
||||
# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
# creator
|
||||
owner=tes@sherman.melbourne.sgi.com
|
||||
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.dump
|
||||
|
||||
# real QA test starts here
|
||||
|
||||
_require_tape $RMT_TAPE_USER@$RMT_IRIXTAPE_DEV
|
||||
_create_dumpdir_fill
|
||||
_erase_soft
|
||||
_do_dump -o -F
|
||||
_do_restore
|
||||
_diff_compare
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,89 @@
|
||||
QA output created by 055
|
||||
Creating directory system to dump using src/fill.
|
||||
Setup ....................................
|
||||
Erasing tape
|
||||
Dumping to tape...
|
||||
xfsdump -o -F -l0 -f TAPE_DEV -M stress_tape_media -L stress_055 SCRATCH_MNT
|
||||
xfsdump: version 3.0 - Running single-threaded
|
||||
xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
|
||||
xfsdump: dump date: DATE
|
||||
xfsdump: session id: ID
|
||||
xfsdump: session label: "stress_055"
|
||||
xfsdump: ino map phase 1: skipping (no subtrees specified)
|
||||
xfsdump: ino map phase 2: constructing initial dump list
|
||||
xfsdump: ino map phase 3: skipping (no pruning necessary)
|
||||
xfsdump: ino map phase 4: skipping (size estimated in phase 2)
|
||||
xfsdump: ino map phase 5: skipping (only one dump stream)
|
||||
xfsdump: ino map construction complete
|
||||
xfsdump: estimated dump size: NUM bytes
|
||||
xfsdump: /var/xfsdump/inventory created
|
||||
xfsdump: preparing drive
|
||||
xfsdump: WARNING: media may contain data. Overwrite option specified
|
||||
xfsdump: creating dump session media file 0 (media 0, file 0)
|
||||
xfsdump: dumping ino map
|
||||
xfsdump: dumping directories
|
||||
xfsdump: dumping non-directory files
|
||||
xfsdump: ending media file
|
||||
xfsdump: media file size NUM bytes
|
||||
xfsdump: dumping session inventory
|
||||
xfsdump: beginning inventory media file
|
||||
xfsdump: media file 1 (media 0, file 1)
|
||||
xfsdump: ending inventory media file
|
||||
xfsdump: inventory media file size NUM bytes
|
||||
xfsdump: writing stream terminator
|
||||
xfsdump: beginning media stream terminator
|
||||
xfsdump: media file 2 (media 0, file 2)
|
||||
xfsdump: ending media stream terminator
|
||||
xfsdump: media stream terminator size 245760 bytes
|
||||
xfsdump: dump size (non-dir files) : NUM bytes
|
||||
xfsdump: dump complete: SECS seconds elapsed
|
||||
Rewinding tape
|
||||
Restoring from tape...
|
||||
xfsrestore -f TAPE_DEV -L stress_055 RESTORE_DIR
|
||||
xfsrestore: version 3.0 - Running single-threaded
|
||||
xfsrestore: using online session inventory
|
||||
xfsrestore: searching media for directory dump
|
||||
xfsrestore: preparing drive
|
||||
xfsrestore: examining media file 0
|
||||
xfsrestore: reading directories
|
||||
xfsrestore: directory post-processing
|
||||
xfsrestore: restoring non-directory files
|
||||
xfsrestore: restore complete: SECS seconds elapsed
|
||||
Comparing dump directory with restore directory
|
||||
Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
|
||||
Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
|
||||
Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
|
||||
Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
|
||||
Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
|
||||
Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
|
||||
Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
|
||||
Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
|
||||
Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
|
||||
Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
|
||||
Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
|
||||
Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
|
||||
Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
|
||||
Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
|
||||
Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
|
||||
Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
|
||||
Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
|
||||
Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
|
||||
Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
|
||||
Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
|
||||
Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
|
||||
Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
|
||||
Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
|
||||
Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
|
||||
Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
|
||||
Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
|
||||
Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
|
||||
Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
|
||||
Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
|
||||
Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
|
||||
Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
|
||||
Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
|
||||
Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
|
||||
Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
|
||||
Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
|
||||
Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
|
||||
Only in SCRATCH_MNT: RESTORE_SUBDIR
|
||||
@@ -48,6 +48,7 @@
|
||||
# TAPE_DEV - the tape device for the xfsdump tests
|
||||
# RMT_TAPE_DEV - the remote tape device for the xfsdump tests
|
||||
# RMT_IRIXTAPE_DEV - the IRIX remote tape device for the xfsdump tests
|
||||
# RMT_TAPE_USER - remote user for tape device
|
||||
#
|
||||
|
||||
#
|
||||
@@ -89,6 +90,7 @@ in
|
||||
TAPE_DEV=/dev/st0
|
||||
RMT_TAPE_DEV=fuzzy:/dev/st0
|
||||
RMT_IRIXTAPE_DEV=snort:/dev/tape
|
||||
RMT_TAPE_USER=guest
|
||||
;;
|
||||
bruce)
|
||||
TEST_DEV=/dev/sda10
|
||||
@@ -114,6 +116,7 @@ in
|
||||
TAPE_DEV=/dev/st0
|
||||
RMT_TAPE_DEV=sagan:/dev/st0
|
||||
RMT_IRIXTAPE_DEV=snort:/dev/tape
|
||||
RMT_TAPE_USER=guest
|
||||
;;
|
||||
leesa)
|
||||
TEST_DEV=/dev/xfs_test
|
||||
|
||||
+9
-1
@@ -87,9 +87,17 @@ _mt()
|
||||
op=$1
|
||||
if _isrmt; then
|
||||
# REMOTE
|
||||
_rmthost=`echo $dumptape | awk -F: '{print $1}'`
|
||||
_rmtdev=`echo $dumptape | awk -F: '{print $2}'`
|
||||
|
||||
if echo $dumptape | grep '@' >/dev/null; then
|
||||
_spec=`echo $dumptape | awk -F: '{print $1}'`
|
||||
_rmtuser=`echo $_spec | awk -F@ '{print $1}'`
|
||||
_rmthost=`echo $_spec | awk -F@ '{print $2}'`
|
||||
rsh -n -l $_rmtuser $_rmthost "mt -t $_rmtdev $op"
|
||||
else
|
||||
_rmthost=`echo $dumptape | awk -F: '{print $1}'`
|
||||
rsh -n $_rmthost "mt -t $_rmtdev $op"
|
||||
fi
|
||||
else
|
||||
#LOCAL
|
||||
mt -t $dumptape $op
|
||||
|
||||
Reference in New Issue
Block a user