diff options
Diffstat (limited to 'shell/ash_test/ash-vars/var_leak.tests')
-rwxr-xr-x | shell/ash_test/ash-vars/var_leak.tests | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/shell/ash_test/ash-vars/var_leak.tests b/shell/ash_test/ash-vars/var_leak.tests index 1b1123fb7..032059295 100755 --- a/shell/ash_test/ash-vars/var_leak.tests +++ b/shell/ash_test/ash-vars/var_leak.tests | |||
@@ -1,9 +1,18 @@ | |||
1 | # This currently fails with CONFIG_FEATURE_SH_NOFORK=y | 1 | # true is a regular builtin, varibale should not leak out of it |
2 | # this currently fails with CONFIG_FEATURE_SH_NOFORK=y | ||
2 | VAR='' | 3 | VAR='' |
3 | VAR=qwe true | 4 | VAR=val1 true |
4 | echo "should be empty: '$VAR'" | 5 | echo "should be empty: '$VAR'" |
5 | 6 | ||
6 | # This fails (always) | 7 | # ash follows the "special builtin leaks variables" rule here: |
8 | # exec is a special builtin. (bash does not do it) | ||
7 | VAR='' | 9 | VAR='' |
8 | VAR=qwe exec 2>&1 | 10 | VAR=val2 exec 2>&1 |
9 | echo "should be empty: '$VAR'" | 11 | echo "should be not empty: '$VAR'" |
12 | |||
13 | # ash follows the "function call is a special builtin" rule here | ||
14 | # (bash does not do it) | ||
15 | f() { true; } | ||
16 | VAR='' | ||
17 | VAR=val3 f | ||
18 | echo "should be not empty: '$VAR'" | ||