Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
9004 Some ZFS tests used files removed with 32 bit kernel
Browse files Browse the repository at this point in the history
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>

Closes #532
  • Loading branch information
jwk404 authored and prakashsurya committed Feb 8, 2018
1 parent cb1204e commit fafe9b2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
3 changes: 2 additions & 1 deletion usr/src/test/zfs-tests/include/commands.cfg
Expand Up @@ -10,7 +10,7 @@
#

#
# Copyright (c) 2016 by Delphix. All rights reserved.
# Copyright (c) 2016, 2018 by Delphix. All rights reserved.
#

#
Expand All @@ -22,6 +22,7 @@
# and maintenance.
#
export USR_BIN_FILES='awk
base64
basename
bc
bunzip2
Expand Down
Expand Up @@ -26,7 +26,7 @@
#

#
# Copyright (c) 2016 by Delphix. All rights reserved.
# Copyright (c) 2016, 2018 by Delphix. All rights reserved.
#

. $STF_SUITE/tests/functional/acl/acl_common.kshlib
Expand All @@ -53,8 +53,7 @@ function cleanup
if datasetexists $TESTPOOL/$TESTFS1; then
log_must zfs destroy -f $TESTPOOL/$TESTFS1
fi
[[ -d $TESTDIR1 ]] && log_must rm -rf $TESTDIR1
[[ -d $TESTDIR ]] && log_must rm -rf $TESTDIR/*
log_must rm -rf $TESTDIR1 $TESTDIR/* $mytestfile
}

log_assert "Verify that 'cp [-p]' supports ZFS ACLs."
Expand All @@ -68,7 +67,9 @@ log_must chmod 777 $TESTDIR1

# Define target directory.
dstdir=$TESTDIR1/dstdir.$$
mytestfile=/kernel/drv/zfs
mytestfile=$(mktemp -t file.XXXX)
log_must dd if=/dev/urandom of=$mytestfile bs=1024k count=1
log_must chmod 644 $mytestfile

for user in root $ZFS_ACL_STAFF1; do
# Set the current user
Expand Down
Expand Up @@ -28,7 +28,7 @@
#

#
# Copyright (c) 2016 by Delphix. All rights reserved.
# Copyright (c) 2016, 2018 by Delphix. All rights reserved.
#

. $STF_SUITE/tests/functional/acl/acl_common.kshlib
Expand Down Expand Up @@ -57,8 +57,7 @@ function cleanup
if (( ${#orig_dir} != 0 )); then
cd $orig_dir
fi
[[ -d $TESTDIR1 ]] && log_must rm -rf $TESTDIR1
[[ -d $TESTDIR ]] && log_must rm -rf $TESTDIR/*
log_must rm -rf $TESTDIR1 $TESTDIR/* $mytestfile
}

log_assert "Verify that 'cpio' command supports to archive ZFS ACLs & xattrs."
Expand All @@ -81,7 +80,9 @@ CPIOFILE=cpiofile.$$
file=$TESTFILE0
dir=dir.$$
orig_dir=$PWD
mytestfile=/kernel/drv/zfs
mytestfile=$(mktemp -t file.XXXX)
log_must dd if=/dev/urandom of=$mytestfile bs=1024k count=1
log_must chmod 644 $mytestfile

typeset user
for user in root $ZFS_ACL_STAFF1; do
Expand Down
Expand Up @@ -28,7 +28,7 @@
#

#
# Copyright (c) 2016 by Delphix. All rights reserved.
# Copyright (c) 2016, 2018 by Delphix. All rights reserved.
#

. $STF_SUITE/tests/functional/acl/acl_common.kshlib
Expand Down Expand Up @@ -57,8 +57,7 @@ function cleanup
fi

(( ${#cwd} != 0 )) && cd $cwd
[[ -d $TESTDIR1 ]] && log_must rm -rf $TESTDIR1
[[ -d $TESTDIR/ ]] && log_must rm -rf $TESTDIR/*
log_must rm -rf $TESTDIR1 $TESTDIR/* $mytestfile
}

log_assert "Verify that 'tar' command supports to archive ZFS ACLs & xattrs."
Expand All @@ -67,7 +66,9 @@ log_onexit cleanup

set -A ops " A+user:other1:add_file:allow" "A+everyone@:execute:allow" "a-x" \
"777"
mytestfile=/kernel/drv/zfs
mytestfile=$(mktemp -t file.XXXX)
log_must dd if=/dev/urandom of=$mytestfile bs=1024k count=1
log_must chmod 644 $mytestfile

TARFILE=tarfile.$$.tar
cwd=$PWD
Expand Down
4 changes: 2 additions & 2 deletions usr/src/test/zfs-tests/tests/functional/rsend/send-cD.ksh
Expand Up @@ -12,7 +12,7 @@
#

#
# Copyright (c) 2015 by Delphix. All rights reserved.
# Copyright (c) 2015, 2018 by Delphix. All rights reserved.
#

. $STF_SUITE/tests/functional/rsend/rsend.kshlib
Expand Down Expand Up @@ -46,7 +46,7 @@ log_must zfs create -o compress=lz4 $sendfs
log_must zfs create -o compress=lz4 $recvfs
typeset dir=$(get_prop mountpoint $sendfs)
# Don't use write_compressible: we want compressible but undedupable data here.
log_must cp /kernel/genunix $dir/file
log_must eval "dd if=/dev/urandom bs=1024k count=4 | base64 >$dir/file"
log_must zfs snapshot $sendfs@snap0
log_must eval "zfs send -D -c $sendfs@snap0 >$stream0"

Expand Down

0 comments on commit fafe9b2

Please sign in to comment.