mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
ZTS: Avoid unset $tmpdir in redacted_panic
The redacted_send tests make use of a $tmpdir variable, except in redacted_send/redacted_panic the variable is never defined. Use $TEST_BASE_DIR instead. Clean up the stream file after the test. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #12455
This commit is contained in:
parent
e945e8d7f4
commit
5bfc3a99f9
@ -28,9 +28,15 @@ typeset ds_name="panic"
|
||||
typeset sendfs="$POOL/$ds_name"
|
||||
typeset recvfs="$POOL2/$ds_name"
|
||||
typeset clone="$POOL/${ds_name}_clone"
|
||||
typeset stream=$(mktemp $tmpdir/stream.XXXX)
|
||||
typeset stream=$(mktemp $TEST_BASE_DIR/stream.XXXX)
|
||||
|
||||
log_onexit redacted_cleanup $sendfs $recvfs
|
||||
function cleanup
|
||||
{
|
||||
redacted_cleanup $sendfs $recvfs
|
||||
rm -f $stream
|
||||
}
|
||||
|
||||
log_onexit cleanup
|
||||
|
||||
log_must zfs create -o recsize=8k $sendfs
|
||||
log_must dd if=/dev/urandom of=/$sendfs/file bs=1024k count=2048
|
||||
|
Loading…
Reference in New Issue
Block a user