mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: move remaining tests out of top level directory
These are tests that are shared between multiple filesystems (moved to shared), and udf/btrfs/ext4 specific tests, moved to appropriate directories. I created the "shared" directory to indicate tests that are not truly generic, but also not filesystem specific. They might rely on a feature that is only implmented in a few filesystems and so can't be truly generic. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Phil White <pwhite@sgi.com> [rjohnston@sgi.com reworked for TOT changes] Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
fc48dfb966
commit
8ff10d6d1c
Executable
+275
@@ -0,0 +1,275 @@
|
||||
#! /bin/bash
|
||||
# FS QA Test No. 098. Modified from UDFQA test 035
|
||||
#
|
||||
# simple attr tests for EAs:
|
||||
# - set
|
||||
# - get
|
||||
# - list
|
||||
# - remove
|
||||
# Basic testing.
|
||||
# + udf_db checks.
|
||||
# (033 + udf_db)
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2000-2004 Silicon Graphics, Inc. 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
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
rm -f $tmp.*
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
_db_filter()
|
||||
{
|
||||
awk '
|
||||
/<file_entry name=/ { fe_on=1 }
|
||||
/<timestamp/ { ts_on=1; next }
|
||||
/<\/timestamp/ { ts_on=0; next }
|
||||
/<cksum/ { next }
|
||||
/<desc_crc/ { next }
|
||||
/<pos/ { next }
|
||||
/<tag_loc/ { next }
|
||||
/<lb_num/ { next }
|
||||
fe_on == 1 && ts_on == 0 { print; next }
|
||||
{ next }
|
||||
'
|
||||
}
|
||||
|
||||
_umount_check_mount()
|
||||
{
|
||||
cd /
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
udf_db -f $SCRATCH_DEV | _db_filter
|
||||
|
||||
_scratch_mount
|
||||
cd $SCRATCH_MNT
|
||||
}
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs udf
|
||||
_supported_os IRIX
|
||||
|
||||
_require_scratch
|
||||
_require_attrs
|
||||
|
||||
_setup_testdir
|
||||
|
||||
cd $SCRATCH_MNT
|
||||
|
||||
echo "create file foo"
|
||||
echo "file_contents" >foo
|
||||
cat foo
|
||||
|
||||
echo "should be no EAs for foo:"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "set EA <noise,woof>:"
|
||||
${ATTR_PROG} -s noise -V woof foo
|
||||
|
||||
echo "set EA <colour,blue>:"
|
||||
${ATTR_PROG} -s colour -V blue foo
|
||||
|
||||
echo "set EA <size,small>:"
|
||||
${ATTR_PROG} -s size -V small foo
|
||||
|
||||
echo "list the EAs for foo: noise, colour, size"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "check the list again for foo"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "unmount the FS and see if EAs are persistent"
|
||||
_umount_check_mount
|
||||
|
||||
echo "check the list again for foo after umount/mount"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "get the value of the noise EA"
|
||||
${ATTR_PROG} -g noise foo
|
||||
|
||||
echo "get the value of the colour EA which was removed earlier"
|
||||
${ATTR_PROG} -g colour foo
|
||||
|
||||
echo "get the value of the size EA"
|
||||
${ATTR_PROG} -g size foo
|
||||
|
||||
echo "remove the colour EA on foo"
|
||||
${ATTR_PROG} -r colour foo
|
||||
|
||||
echo "list EAs for foo: noise, size"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "get the value of the noise EA"
|
||||
${ATTR_PROG} -g noise foo
|
||||
|
||||
echo "get the value of the colour EA which was removed earlier"
|
||||
${ATTR_PROG} -g colour foo
|
||||
|
||||
echo "get the value of the size EA"
|
||||
${ATTR_PROG} -g size foo
|
||||
|
||||
echo "list all the EAs again: noise, size"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "change the value of the size EA from small to huge"
|
||||
${ATTR_PROG} -s size -V huge foo
|
||||
|
||||
echo "get the size EA which should now have value huge"
|
||||
${ATTR_PROG} -g size foo
|
||||
|
||||
echo "list EAs: noise, size"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "remove the size EA from foo"
|
||||
${ATTR_PROG} -r size foo
|
||||
|
||||
echo "list EAs: noise (size EA has been removed)"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "get the noise EA: woof"
|
||||
${ATTR_PROG} -g noise foo
|
||||
|
||||
echo "try removing non-existent EA named woof"
|
||||
${ATTR_PROG} -r woof foo
|
||||
|
||||
echo "try removing already removed EA size"
|
||||
${ATTR_PROG} -r size foo
|
||||
|
||||
echo "list EAs: noise"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "try removing already removed EA colour"
|
||||
${ATTR_PROG} -r colour foo
|
||||
|
||||
echo "list EAs: noise"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "remove remaining EA noise"
|
||||
${ATTR_PROG} -r noise foo
|
||||
|
||||
echo "list EAs: should be no EAs left now"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "unmount the FS and see if EAs are persistent"
|
||||
_umount_check_mount
|
||||
|
||||
echo "list EAs: should still be no EAs left"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo ""
|
||||
echo "*** Test out the root namespace ***"
|
||||
echo ""
|
||||
|
||||
echo "set EA <root:colour,marone>:"
|
||||
${ATTR_PROG} -R -s colour -V marone foo
|
||||
|
||||
echo "set EA <user:colour,beige>:"
|
||||
${ATTR_PROG} -s colour -V beige foo
|
||||
|
||||
echo "set EA <user:vomit,pizza>:"
|
||||
${ATTR_PROG} -s vomit -V pizza foo
|
||||
|
||||
echo "set EA <root:noise,whack>:"
|
||||
${ATTR_PROG} -R -s noise -V whack foo
|
||||
|
||||
echo "list root EAs: <root:colour,noise>:"
|
||||
${ATTR_PROG} -R -l foo
|
||||
|
||||
echo "list user EAs: <user:colour,vomit>:"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "get root EA colour: marone"
|
||||
${ATTR_PROG} -R -g colour foo
|
||||
|
||||
echo "get root EA noise: whack"
|
||||
${ATTR_PROG} -R -g noise foo
|
||||
|
||||
echo "get root EA vomit which is a user EA => find nothing"
|
||||
${ATTR_PROG} -R -g vomit foo
|
||||
|
||||
echo ""
|
||||
echo "unmount the FS and see if EAs are persistent"
|
||||
echo ""
|
||||
_umount_check_mount
|
||||
|
||||
echo "get root EA colour: marone"
|
||||
${ATTR_PROG} -R -g colour foo
|
||||
|
||||
echo "get root EA noise: whack"
|
||||
${ATTR_PROG} -R -g noise foo
|
||||
|
||||
echo "get user EA vomit: pizza"
|
||||
${ATTR_PROG} -g vomit foo
|
||||
|
||||
echo "remove the root colour EA"
|
||||
${ATTR_PROG} -R -r colour foo
|
||||
|
||||
echo "list root EAs: <root:noise>:"
|
||||
${ATTR_PROG} -R -l foo
|
||||
|
||||
echo "list user EAs: <user:colour,vomit>:"
|
||||
${ATTR_PROG} -l foo
|
||||
|
||||
echo "remove the final root EA noise"
|
||||
${ATTR_PROG} -R -r noise foo
|
||||
|
||||
echo "list root EAs: none"
|
||||
${ATTR_PROG} -R -l foo
|
||||
|
||||
cd /
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
udf_db -f $SCRATCH_DEV | _db_filter
|
||||
|
||||
# Checks the udf filesystem
|
||||
_check_udf_filesystem $SCRATCH_DEV
|
||||
|
||||
_scratch_mount
|
||||
cd $SCRATCH_MNT
|
||||
|
||||
echo "delete the file foo - which will delete the associated streams"
|
||||
rm foo
|
||||
|
||||
cd /
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
udf_db -f $SCRATCH_DEV | _db_filter
|
||||
|
||||
# Checks the udf filesystem
|
||||
_check_udf_filesystem $SCRATCH_DEV
|
||||
|
||||
# optional stuff if your test has verbose output to help resolve problems
|
||||
#echo
|
||||
#echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
+1594
File diff suppressed because it is too large
Load Diff
Executable
+61
@@ -0,0 +1,61 @@
|
||||
#! /bin/bash
|
||||
# FS QA Test No. 101. Modified from UDFQA test 029.
|
||||
#
|
||||
# This tests mkfs_udf with -s [SIZE] option.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2000-2004 Silicon Graphics, Inc. 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
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
FS_SIZE=2048
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
rm -f $tmp.*
|
||||
}
|
||||
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs udf
|
||||
_supported_os IRIX
|
||||
|
||||
MKFS_OPTIONS="-s $FS_SIZE"
|
||||
|
||||
_require_scratch
|
||||
_setup_udf_scratchdir
|
||||
umount $SCRATCH_MNT
|
||||
|
||||
# Inspect the space bitmap
|
||||
echo bitmap | udf_db -c - $SCRATCH_DEV
|
||||
|
||||
# Run udf_test
|
||||
_check_udf_filesystem $SCRATCH_DEV $FS_SIZE
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,19 @@
|
||||
QA output created by 101
|
||||
<space_bitmap name="unalloc">
|
||||
<desc_tag name="tag">
|
||||
<id val="264" />
|
||||
<descriptor_ver val="3" />
|
||||
<cksum val="13" />
|
||||
<reserved val="0" />
|
||||
<serial_num val="0" />
|
||||
<desc_crc val="0" />
|
||||
<desc_crc_len val="0" />
|
||||
<tag_loc val="1" />
|
||||
</desc_tag>
|
||||
<num_bits val="1500" />
|
||||
<num_bytes val="188" />
|
||||
<bitmap>
|
||||
0-3 [4]: 0
|
||||
4-1499 [1496]: 1
|
||||
</bitmap>
|
||||
</space_bitmap>
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
#! /bin/bash
|
||||
# FS QA Test No. 102
|
||||
#
|
||||
# This tests mkfs_udf/mkudffs and the device detection code
|
||||
# Modified from UDFQA test 031.
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
# Copyright (c) 2000-2004 Silicon Graphics, Inc. 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
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
#
|
||||
|
||||
seq=`basename $0`
|
||||
echo "QA output created by $seq"
|
||||
|
||||
here=`pwd`
|
||||
tmp=/tmp/$$
|
||||
status=1 # failure is the default!
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
|
||||
_cleanup()
|
||||
{
|
||||
rm -f $tmp.*
|
||||
cd /
|
||||
_cleanup_testdir
|
||||
}
|
||||
# get standard environment, filters and checks
|
||||
. ./common.rc
|
||||
. ./common.filter
|
||||
|
||||
# real QA test starts here
|
||||
_supported_fs udf
|
||||
_supported_os Linux IRIX
|
||||
|
||||
_require_scratch
|
||||
_setup_udf_scratchdir
|
||||
|
||||
# Checks the udf filesystem
|
||||
_check_udf_filesystem $SCRATCH_DEV
|
||||
|
||||
echo "Finished"
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
exit
|
||||
@@ -0,0 +1,2 @@
|
||||
QA output created by 102
|
||||
Finished
|
||||
@@ -0,0 +1,8 @@
|
||||
# QA groups control file
|
||||
# Defines test groups and nominal group owners
|
||||
# - do not start group names with a digit
|
||||
# - comment line before each group is "new" description
|
||||
#
|
||||
098 udf auto
|
||||
101 udf
|
||||
102 udf
|
||||
Reference in New Issue
Block a user