From patchwork Wed May 31 22:36:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 9758325 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 60DBE603F7 for ; Wed, 31 May 2017 22:40:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F22F28453 for ; Wed, 31 May 2017 22:40:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44042284BF; Wed, 31 May 2017 22:40:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86D9E284BD for ; Wed, 31 May 2017 22:40:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751097AbdEaWkM (ORCPT ); Wed, 31 May 2017 18:40:12 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33110 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbdEaWkJ (ORCPT ); Wed, 31 May 2017 18:40:09 -0400 Received: by mail-pf0-f179.google.com with SMTP id e193so19647988pfh.0 for ; Wed, 31 May 2017 15:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WZfCt84Ht6LNR0OHU2WL8NbHBBcv7WeK0SedecS7l4k=; b=LrlV8RHIPzUV2kMYihZjXlKaDfaHlCB+zoyuAAiANzpxsAg4HjR9blWLoMcGXH8mEt Cm7Kr9/2ihwLsR+T6RUeaNcHw3sPqbxXCExxsVRxoSylQu8/bjClu6LglqLaF+lXLZb4 LxCWwHc29sSKWwDwJ6Vgg7psJhgBL0ave3jKgNVyZ1Sngk5Al8dVq0B9Ej2scrjJLp4A yjvvj8fMi+DjNHuNecfKkuu4WuQEMjYt4hfWQJLRvTTqFNpnoUBN0Rl24sOBREVwe1q6 dcHupKxvmb47JxZf3YVTXoTwLcDFxmQ+ShDhgAqJELhI5cvbjLAuvqhXEn3nNFRTJ5B/ RnXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WZfCt84Ht6LNR0OHU2WL8NbHBBcv7WeK0SedecS7l4k=; b=j/F9U5H8XSvOLs4eM5biRdPbndckhwjXZlxy0Kb2UZ+dvzgxq3B3ZoQcWg623VZzL5 TZIOX/Sx+03wwZylPgK2VVmfKMQENd18G/IaHCv9qjS8SRNvPWwzmBIBOZ6ncMxD938U MW7MBAU9KQcm7KvkKfG1sTHR2GT6w43DmUmTEjiXBAF6sslpYfoeFmwp+RZyTE0yJ0An 4Rtcg1AdisEoU/WFzhUmmI0os+GLcfB/yyKHY6a9edtFZf4/9Qvd4fEvV8K6agATawcQ 6OkY0w9n2vJLRYShS0WtU4Ga8Zmbx4e3PtAQTN76AEolGUo1z/5qH6OUUcjEnhqs5GdH OiuA== X-Gm-Message-State: AODbwcDegHLOOxLyr9ETi3yWMXeXbGRcWxW8TitzPu1yP73At1cKXVF2 b7ziVjBYMyOfgmHXMyI= X-Received: by 10.98.150.12 with SMTP id c12mr15119629pfe.201.1496270408402; Wed, 31 May 2017 15:40:08 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([100.66.174.81]) by smtp.gmail.com with ESMTPSA id 15sm28551734pfk.115.2017.05.31.15.40.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 May 2017 15:40:08 -0700 (PDT) From: Eric Biggers To: fstests@vger.kernel.org Cc: Eric Biggers Subject: [PATCH 5/6] common: remove IRIX-specific code Date: Wed, 31 May 2017 15:36:54 -0700 Message-Id: <20170531223655.130613-6-ebiggers3@gmail.com> X-Mailer: git-send-email 2.13.0.506.g27d5fe0cd-goog In-Reply-To: <20170531223655.130613-1-ebiggers3@gmail.com> References: <20170531223655.130613-1-ebiggers3@gmail.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers As xfstests is no longer supported on IRIX, remove IRIX-specific code from the common helper scripts. Signed-off-by: Eric Biggers --- common/attr | 6 +----- common/config | 12 ------------ common/dump | 39 +++------------------------------------ common/filestreams | 43 ++++++------------------------------------- common/log | 1 - common/rc | 23 +++-------------------- 6 files changed, 13 insertions(+), 111 deletions(-) diff --git a/common/attr b/common/attr index c840ce42..42a197fe 100644 --- a/common/attr +++ b/common/attr @@ -122,11 +122,7 @@ _acl_list() { _file1=$1 - if [ $HOSTOS = "IRIX" ]; then - ls -dD $_file1 | _acl_filter_id - else - chacl -l $_file1 | _acl_filter_id - fi + chacl -l $_file1 | _acl_filter_id } # create an ACL with n ACEs in it diff --git a/common/config b/common/config index 090e9117..09237519 100644 --- a/common/config +++ b/common/config @@ -52,15 +52,10 @@ export LANG=C export LC_ALL=C -# Warning: don't put freeware before /usr/bsd on IRIX coz you'll -# get the wrong hostname and set your system name to -s :) -[ -d /usr/bsd ] && PATH=$PATH:/usr/bsd -[ -d /usr/freeware/bin ] && PATH=$PATH:/usr/freeware/bin PATH=".:$PATH" export HOST=`hostname -s` export HOSTOS=`uname -s` -[ "$HOSTOS" = "IRIX64" ] && export HOSTOS="IRIX" export MODULAR=0 # using XFS as a module or not export BOOT="/boot" # install target for kernels @@ -219,13 +214,6 @@ fi export UDEV_SETTLE_PROG case "$HOSTOS" in - IRIX*) - export MKFS_XFS_PROG="`set_prog_path mkfs_xfs`" - export MKFS_UDF_PROG="`set_prog_path mkfs_udf`" - export XFS_FSR_PROG="`set_prog_path /usr/etc/fsr_xfs`" - export MKFS_NFS_PROG="false" - export MKFS_CIFS_PROG="false" - ;; Linux) export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`" export MKFS_EXT4_PROG="`set_prog_path mkfs.ext4`" diff --git a/common/dump b/common/dump index d6663e0c..b0e4a12f 100644 --- a/common/dump +++ b/common/dump @@ -395,8 +395,6 @@ End-of-File _mk_fillconfig_perm() { - # dir_guid: ugo=rwx,g+s on dir is for IRIX chmod(1) - cat <$tmp.config # pathname size/dir user group mode # @@ -406,7 +404,7 @@ file_sticky 10 $nobody $nobody 01777 file_mix1 10 $nobody $nobody 761 file_mix2 10 $nobody $nobody 642 dir_suid d $nobody $nobody 04777 -dir_guid d $nobody $nobody ugo=rwx,g+s +dir_guid d $nobody $nobody 02777 dir_sticky d $nobody $nobody 01777 dir_mix1 d $nobody $nobody 761 dir_mix2 d $nobody $nobody 642 @@ -798,25 +796,6 @@ _ls_filter() | sed -e 's/total [0-9][0-9]*/total TOTAL/' } -# -# Filtering of Irix character hwgraph device names -# e.g. -# chardev: /hw/node/xtalk/15/pci/0/scsi_ctlr/0/target/1/lun/0/disk/partition/4/char -# blkdev: /dev/dsk/dks0d1s4 -# -_filter_devchar() -{ - $AWK_PROG ' - /\/hw\/node/ { - sub(/\/hw.*scsi_ctlr\//,"/dev/dsk/dks") # blah blah /dev/dsk/dks0/target/1/.... - sub(/\/target\//,"d") # blah blah /dev/dsk/dks0d1/lun/0/disk..... - sub(/\/lun.*partition\//,"s") # blah blah /dev/dsk/dks0d1s4/char - sub(/\/char/,"") # blah blah /dev/dsk/dks0d1s4 - } - { print } - ' -} - # # Filter out the non-deterministic dump msgs from @@ -824,7 +803,6 @@ _filter_devchar() # _dump_filter_main() { - _filter_devchar |\ sed \ -e "s#$__XFSDUMP_PROG#xfsdump#" \ -e "s#$XFSRESTORE_PROG#xfsrestore#" \ @@ -1191,7 +1169,7 @@ _do_restore_toc() echo "Contents of dump ..." opts="$_restore_debug$restore_args -f $dump_file -t" echo "xfsrestore $opts" | _dir_filter - cd $SCRATCH_MNT # for IRIX which needs xfs cwd + cd $SCRATCH_MNT $XFSRESTORE_PROG $opts 2>&1 | tee -a $seqres.full | _dump_filter_main |\ _check_quota_file |\ _check_quota_entries |\ @@ -1484,25 +1462,14 @@ _check_quota_entries() # xfsrestore: user quota information written to ...' # xfsrestore: group quota information written to ...' # xfsrestore: project quota information written to ...' -# -# If on IRIX then look for: -# xfsrestore: use 'edquota' to restore quotas -# Else look for: # xfsrestore: use 'xfs_quota' to restore quotas # _check_quota_dumprestore() { - if [ "$HOSTOS" == "IRIX" ]; then _check_quota 'user quota information' \ 'group quota information' \ 'project quota information' | \ - sed "/xfsrestore:.*use 'edquota' to restore quotas/d" - else - _check_quota 'user quota information' \ - 'group quota information' \ - 'project quota information' | \ - sed "/xfsrestore:.*use 'xfs_quota' to restore quotas/d" - fi + sed "/xfsrestore:.*use 'xfs_quota' to restore quotas/d" } # diff --git a/common/filestreams b/common/filestreams index 4d146648..f5441f5a 100644 --- a/common/filestreams +++ b/common/filestreams @@ -21,35 +21,12 @@ _check_filestreams_support() { - local irix_timeout_sysvar="xfs_mfstream_timeout" - local linux_timeout_procvar="/proc/sys/fs/xfs/filestream_centisecs" - local streams_avail="" - if [ "$HOSTOS" == "IRIX" ]; then - # check for the filestreams timeout systune variable in irix - streams_avail=`systune $irix_timeout_sysvar 2>&1 | - perl -ne 'if (/'$irix_timeout_sysvar'\s+=\s+\d+/) {print "true"}'` - else - # check for the filestreams timeout proc entry in linux - [ -f $linux_timeout_procvar ] && streams_avail="true" - fi - - if [ "$streams_avail" == "true" ]; then - return 0 - else - return 1 - fi + [ -f /proc/sys/fs/xfs/filestream_centisecs ] } _set_stream_timeout_centisecs() { - local new_timeout_csecs=$1 - local irix_timeout_sysvar="xfs_mfstream_timeout" - local linux_timeout_procvar="/proc/sys/fs/xfs/filestream_centisecs" - if [ "$HOSTOS" == "IRIX" ]; then - echo y | systune -r $irix_timeout_sysvar $new_timeout_csecs >/dev/null - else - echo $new_timeout_csecs > $linux_timeout_procvar - fi + echo $1 > /proc/sys/fs/xfs/filestream_centisecs } _do_stream() @@ -63,22 +40,14 @@ _do_stream() local blocks_in_file=`expr $file_size / $bsize` mkdir $directory_name - if [ "$iflag" = "1" -a "$HOSTOS" != "IRIX" ]; then + if [ "$iflag" = "1" ]; then $XFS_IO_PROG -x -c "chattr +S" $directory_name \ || _fail "chattr of filestream flag" fi cd $directory_name - local dd_cmd="" - if [ "$HOSTOS" == "IRIX" ]; then - # for irix use lmdd - dd_cmd="lmdd" - [ "$dio" = "1" ] && dd_cmd="$dd_cmd odirect=1" - else - # for linux use dd - dd_cmd="dd" - [ "$dio" = "1" ] && dd_cmd="$dd_cmd oflag=direct" - fi + local dd_cmd="dd" + [ "$dio" = "1" ] && dd_cmd="$dd_cmd oflag=direct" dd_cmd="$dd_cmd if=/dev/zero bs=${bsize} count=${blocks_in_file}" local i=1 @@ -140,7 +109,7 @@ _test_streams() { _scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \ || _fail "mkfs failed" - if [ "$use_iflag" = "0" -o "$HOSTOS" == "IRIX" ]; then + if [ "$use_iflag" = "0" ]; then # mount using filestreams mount option _scratch_mount "-o filestreams" \ || _fail "filestreams mount failed" diff --git a/common/log b/common/log index d1c19ff5..bdb4ed68 100644 --- a/common/log +++ b/common/log @@ -314,7 +314,6 @@ _print_operation() # and may not match with the FS mounted at a different LR size # => xlog_do_recovery_pass() can not handle the different hdr sizes # it assumes them all to be the same between the start..finish -# NB: On IRIX there is no UMOUNT record and so we could start from -s 0. _print_transaction_inode() { diff --git a/common/rc b/common/rc index 743df427..346b23af 100644 --- a/common/rc +++ b/common/rc @@ -235,7 +235,7 @@ _scratch_options() case $type in mkfs) - [ "$HOSTOS" != "IRIX" ] && SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f" + SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f" rt_opt="-r" log_opt="-l" ;; @@ -284,14 +284,7 @@ _mount_ops_filter() [ $last_index -gt 0 ] && shift $last_index FS_ESCAPED=$1 - # irix is fussy about how it is fed its mount options - # - multiple -o's are not allowed - # - no spaces between comma delimitered options - # the sed script replaces all -o's (except the first) with a comma - # not required for linux, but won't hurt - - echo $params | sed -e 's/[[:space:]]\+-o[[:space:]]*/UnIqUe/1; s/[[:space:]]\+-o[[:space:]]*/,/g; s/UnIqUe/ -o /1' \ - | sed -e 's/dmapi/dmi/' \ + echo $params | sed -e 's/dmapi/dmi/' \ | $PERL_PROG -ne "s#mtpt=[^,|^\n|^\s]*#mtpt=$FS_ESCAPED\1\2#; print;" } @@ -2042,12 +2035,7 @@ s,^\s*$,,; _user_do() { - if [ "$HOSTOS" == "IRIX" ] - then - echo $1 | /bin/bash "su $qa_user 2>&1" | _filter_user_do - else echo $1 | su -s /bin/bash $qa_user 2>&1 | _filter_user_do - fi } _require_xfs_io_command() @@ -2606,9 +2594,7 @@ _full_platform_details() _get_os_name() { - if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then - echo 'irix' - elif [ "`uname`" == "Linux" ]; then + if [ "`uname`" == "Linux" ]; then echo 'linux' else echo Unknown operating system: `uname` @@ -3172,9 +3158,6 @@ run_check() _require_test_symlinks() { - # IRIX UDF does not support symlinks - [ "$HOSTOS" = "IRIX" -a "$FSTYP" = 'udf' ] && \ - _notrun "Require symlinks support" target=`mktemp -p $TEST_DIR` link=`mktemp -p $TEST_DIR -u` ln -s `basename $target` $link