File tree Expand file tree Collapse file tree 8 files changed +10
-29
lines changed
tests/zfs-tests/tests/functional/channel_program/lua_core Expand file tree Collapse file tree 8 files changed +10
-29
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,6 @@ log_must_program $TESTPOOL $ZCP_ROOT/lua_core/tst.exists.zcp \
38
38
$TESTPOOL /$TESTCLONE
39
39
40
40
log_mustnot_checkerror_program " not in the target pool" \
41
- $TESTPOOL - << -EOF
42
- return zfs.exists('rpool')
43
- EOF
41
+ $TESTPOOL - <<< " return zfs.exists('rpool')"
44
42
45
43
log_pass " zfs.exists() gives correct results"
Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ set -A args "1.0" \
32
32
33
33
typeset -i i=0
34
34
while (( i < ${# args[*]} )) ; do
35
- log_mustnot_checkerror_program " malformed number" $TESTPOOL - << -EOF
36
- return ${args[i]}
37
- EOF
35
+ log_mustnot_checkerror_program " malformed number" $TESTPOOL - <<< " return ${args[i]}"
38
36
(( i = i + 1 ))
39
37
done
40
38
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ verify_runnable "global"
25
25
26
26
log_assert " overflowing a 64-bit integer should wrap around"
27
27
28
- log_must_program $TESTPOOL - << -EOF
29
- assert(18446744073709551615 + 1 == (-18446744073709551616))
30
- EOF
28
+ log_must_program $TESTPOOL - <<< " assert(18446744073709551615 + 1 == (-18446744073709551616))"
31
29
32
30
log_pass " overflowing a 64-bit integer should wrap around"
Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ log_assert "Runtime errors in lua scripts fail as expected."
43
43
44
44
typeset -i i=0
45
45
while (( i < ${# args[*]} )) ; do
46
- log_mustnot_checkerror_program " execution failed" $TESTPOOL - << -EOF
47
- ${args[i]}
48
- EOF
46
+ log_mustnot_checkerror_program " execution failed" $TESTPOOL - <<< " ${args[i]}"
49
47
(( i = i + 1 ))
50
48
done
51
49
Original file line number Diff line number Diff line change @@ -33,9 +33,7 @@ log_assert "Simple lua scripts pass."
33
33
34
34
typeset -i i=0
35
35
while (( i < ${# args[*]} )) ; do
36
- log_must_program $TESTPOOL - << -EOF
37
- ${args[i]}
38
- EOF
36
+ log_must_program $TESTPOOL - <<< " ${args[i]}"
39
37
(( i = i + 1 ))
40
38
done
41
39
Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ log_must zfs create $fs
41
41
output_lines=$( log_must zfs program $TESTPOOL \
42
42
$ZCP_ROOT /lua_core/tst.return_large.zcp | wc -l)
43
43
44
- [[ $output_lines -lt 5000 ]] &&
45
- log_fail " Expected return of full list but only got $output_lines lines"
44
+ log_must [ $output_lines -ge 5000 ]
46
45
47
46
#
48
47
# Make sure we fail if the return is over the memory limit
Original file line number Diff line number Diff line change @@ -45,17 +45,13 @@ set -A args 'function() return 1 end' \
45
45
typeset -i last_index=$(( ${# args[*]} - 1 ))
46
46
for i in $( seq 0 $last_index ) ; do
47
47
log_note " running program: ${args[i]} "
48
- log_mustnot_checkerror_program " execution failed" $TESTPOOL - << -EOF
49
- return ${args[i]}
50
- EOF
48
+ log_mustnot_checkerror_program " execution failed" $TESTPOOL - <<< " return ${args[i]}"
51
49
(( i = i + 1 ))
52
50
done
53
51
54
52
for i in $( seq 0 $last_index ) ; do
55
53
log_note " running program: ${args[i]} "
56
- log_mustnot_checkerror_program " execution failed" $TESTPOOL - << -EOF
57
- error(${args[i]} )
58
- EOF
54
+ log_mustnot_checkerror_program " execution failed" $TESTPOOL - <<< " error(${args[i]})"
59
55
(( i = i + 1 ))
60
56
done
61
57
Original file line number Diff line number Diff line change @@ -39,18 +39,14 @@ log_assert "Returning valid lua constructs works."
39
39
typeset -i i=0
40
40
while (( i < ${# args[*]} )) ; do
41
41
log_note " running program: return ${args[i]} "
42
- log_must_program $TESTPOOL - << -EOF
43
- return ${args[i]}
44
- EOF
42
+ log_must_program $TESTPOOL - <<< " return ${args[i]}"
45
43
(( i = i + 1 ))
46
44
done
47
45
48
46
typeset -i i=0
49
47
while (( i < ${# args[*]} )) ; do
50
48
log_note " running program: error(${args[i]} )"
51
- log_mustnot_checkerror_program " in function 'error'" $TESTPOOL - << -EOF
52
- error(${args[i]} )
53
- EOF
49
+ log_mustnot_checkerror_program " in function 'error'" $TESTPOOL - <<< " error(${args[i]})"
54
50
(( i = i + 1 ))
55
51
done
56
52
You can’t perform that action at this time.
0 commit comments