From 4fc85a51cbbc50f8ca16a1face4be4aa414c4f45 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Thu, 18 Jan 2024 20:35:42 +0100 Subject: [PATCH] ts: protect sh alias and function unset code --- testsuite/config/base-config.exp | 5 +- .../modules.50-cmds/391-function-undo.exp | 10 +-- testsuite/modules.50-cmds/400-source-sh.exp | 68 +++++++++---------- .../610-abort_on_error-unload.exp | 20 +++--- .../611-abort_on_error-ml_unload.exp | 16 ++--- .../613-abort_on_error-purge.exp | 14 ++-- .../614-abort_on_error-reload.exp | 4 +- 7 files changed, 70 insertions(+), 67 deletions(-) diff --git a/testsuite/config/base-config.exp b/testsuite/config/base-config.exp index a49efb95f..08fb6222e 100644 --- a/testsuite/config/base-config.exp +++ b/testsuite/config/base-config.exp @@ -390,7 +390,10 @@ proc shell_unalias {test_shell var {re_mode 0}} { } switch -- $test_shell { - {sh} - {bash} - {ksh} - {zsh} - {csh} - {tcsh} { + {sh} - {bash} - {ksh} - {zsh} { + set answer "unalias $var 2>/dev/null || true;" + } + {csh} - {tcsh} { set answer "unalias $var;" } {fish} { diff --git a/testsuite/modules.50-cmds/391-function-undo.exp b/testsuite/modules.50-cmds/391-function-undo.exp index c899ab61d..9f4d21465 100644 --- a/testsuite/modules.50-cmds/391-function-undo.exp +++ b/testsuite/modules.50-cmds/391-function-undo.exp @@ -54,11 +54,11 @@ set ans_sh [list] lappend ans_sh [list unset _LMFILES_] lappend ans_sh [list unset LOADEDMODULES] lappend ans_sh [list unset __MODULES_LMREFRESH] -lappend ans_sh [list "unset -f testsuite2;"] -lappend ans_sh [list "unset -f testsuite3;"] -lappend ans_sh [list "unset -f testsuite4;"] -lappend ans_sh [list "unset -f testsuite;"] -lappend ans_sh [list "unset -f testsuite5;"] +lappend ans_sh [list "unset -f testsuite2 2>/dev/null || true;"] +lappend ans_sh [list "unset -f testsuite3 2>/dev/null || true;"] +lappend ans_sh [list "unset -f testsuite4 2>/dev/null || true;"] +lappend ans_sh [list "unset -f testsuite 2>/dev/null || true;"] +lappend ans_sh [list "unset -f testsuite5 2>/dev/null || true;"] set ans_empty [list] lappend ans_empty [list unset _LMFILES_] diff --git a/testsuite/modules.50-cmds/400-source-sh.exp b/testsuite/modules.50-cmds/400-source-sh.exp index 5a2116ddf..fd88e38b5 100644 --- a/testsuite/modules.50-cmds/400-source-sh.exp +++ b/testsuite/modules.50-cmds/400-source-sh.exp @@ -124,11 +124,11 @@ lappend ans [list unalias alsp] lappend ans [list unalias alfoo] lappend ans [list unalias alcb] lappend ans [list unalias alem] -lappend ans [list "unset -f funcfoo;"] -lappend ans [list "unset -f funccb;"] -lappend ans [list "unset -f funcwc;"] -lappend ans [list "unset -f funcnl;"] -lappend ans [list "unset -f funcsp;"] +lappend ans [list "unset -f funcfoo 2>/dev/null || true;"] +lappend ans [list "unset -f funccb 2>/dev/null || true;"] +lappend ans [list "unset -f funcwc 2>/dev/null || true;"] +lappend ans [list "unset -f funcnl 2>/dev/null || true;"] +lappend ans [list "unset -f funcsp 2>/dev/null || true;"] testouterr_cmd sh {unload source-sh/1} $ans {} skip_if_quick_mode @@ -189,11 +189,11 @@ lappend ans [list unalias alsp] lappend ans [list unalias alfoo] lappend ans [list unalias alcb] lappend ans [list unalias alem] -lappend ans [list "unset -f funcfoo;"] -lappend ans [list "unset -f funccb;"] -lappend ans [list "unset -f funcwc;"] -lappend ans [list "unset -f funcnl;"] -lappend ans [list "unset -f funcsp;"] +lappend ans [list "unset -f funcfoo 2>/dev/null || true;"] +lappend ans [list "unset -f funccb 2>/dev/null || true;"] +lappend ans [list "unset -f funcwc 2>/dev/null || true;"] +lappend ans [list "unset -f funcnl 2>/dev/null || true;"] +lappend ans [list "unset -f funcsp 2>/dev/null || true;"] testouterr_cmd sh {unload source-sh/1} $ans {} # load a third modulefile, using same script than firstly loaded module @@ -262,11 +262,11 @@ lappend ans [list unalias alsp] lappend ans [list unalias alfoo] lappend ans [list unalias alcb] lappend ans [list unalias alem] -lappend ans [list "unset -f funcfoo;"] -lappend ans [list "unset -f funccb;"] -lappend ans [list "unset -f funcwc;"] -lappend ans [list "unset -f funcnl;"] -lappend ans [list "unset -f funcsp;"] +lappend ans [list "unset -f funcfoo 2>/dev/null || true;"] +lappend ans [list "unset -f funccb 2>/dev/null || true;"] +lappend ans [list "unset -f funcwc 2>/dev/null || true;"] +lappend ans [list "unset -f funcnl 2>/dev/null || true;"] +lappend ans [list "unset -f funcsp 2>/dev/null || true;"] testouterr_cmd_re sh {unload source-sh/1} $ans {} @@ -891,10 +891,10 @@ lappend ans [list unset FOOPATHSPEM] lappend ans [list unalias alsp] lappend ans [list unalias alcb] lappend ans [list unalias alem] -lappend ans [list "unset -f funccb;"] -lappend ans [list "unset -f funcwc;"] -lappend ans [list "unset -f funcnl;"] -lappend ans [list "unset -f funcsp;"] +lappend ans [list "unset -f funccb 2>/dev/null || true;"] +lappend ans [list "unset -f funcwc 2>/dev/null || true;"] +lappend ans [list "unset -f funcnl 2>/dev/null || true;"] +lappend ans [list "unset -f funcsp 2>/dev/null || true;"] testouterr_cmd sh {unload source-sh/1} $ans {} unsetenv_var __MODULES_LMREFRESH @@ -1320,11 +1320,11 @@ lappend ans [list unalias alsp] lappend ans [list unalias alfoo] lappend ans [list unalias alcb] lappend ans [list unalias alem] -lappend ans [list out {unset -f funcfoo;}] -lappend ans [list out {unset -f funccb;}] -lappend ans [list out {unset -f funcwc;}] -lappend ans [list out {unset -f funcnl;}] -lappend ans [list out {unset -f funcsp;}] +lappend ans [list out {unset -f funcfoo 2>/dev/null || true;}] +lappend ans [list out {unset -f funccb 2>/dev/null || true;}] +lappend ans [list out {unset -f funcwc 2>/dev/null || true;}] +lappend ans [list out {unset -f funcnl 2>/dev/null || true;}] +lappend ans [list out {unset -f funcsp 2>/dev/null || true;}] lappend ans [list out {complete -r cmd;}] lappend ans [list out {complete -r othercmd;}] lappend ans [list out {complete -r mycmd;}] @@ -1681,9 +1681,9 @@ if {$install_versioning eq {y}} { lappend ans [list set MODULE_VERSION $install_version] } if {$is_modules_defined} { -lappend ans [list {unset -f ml;}] -lappend ans [list {unset -f module;}] -lappend ans [list {unset -f _module_raw;}] +lappend ans [list {unset -f ml 2>/dev/null || true;}] +lappend ans [list {unset -f module 2>/dev/null || true;}] +lappend ans [list {unset -f _module_raw 2>/dev/null || true;}] } testouterr_cmd sh {load source-sh/1} $ans {} @@ -1771,9 +1771,9 @@ if {$install_versioning eq {y}} { lappend ans [list set MODULE_VERSION $install_version] } if {$is_modules_defined} { -lappend ans [list {unset -f ml;}] -lappend ans [list {unset -f module;}] -lappend ans [list {unset -f _module_raw;}] +lappend ans [list {unset -f ml 2>/dev/null || true;}] +lappend ans [list {unset -f module 2>/dev/null || true;}] +lappend ans [list {unset -f _module_raw 2>/dev/null || true;}] } testouterr_cmd sh {load source-sh/1} $ans {} @@ -1806,9 +1806,9 @@ if {$install_versioning eq {y}} { lappend ans [list set MODULE_VERSION $install_version] } if {$is_modules_defined} { -lappend ans [list {unset -f ml;}] -lappend ans [list {unset -f module;}] -lappend ans [list {unset -f _module_raw;}] +lappend ans [list {unset -f ml 2>/dev/null || true;}] +lappend ans [list {unset -f module 2>/dev/null || true;}] +lappend ans [list {unset -f _module_raw 2>/dev/null || true;}] } testouterr_cmd sh {load source-sh/1} $ans {} @@ -1862,7 +1862,7 @@ lappend ans [list set _LMFILES_ $mp/source-sh/1] lappend ans [list set LOADEDMODULES source-sh/1] lappend ans [list set __MODULES_LMSOURCESH source-sh/1\&bash\ testsuite/example/sh-to-mod.sh\|uncomplete\ cmd\|unset-alias\ alfoo\|unset-function\ funcfoo] lappend ans [list unalias alfoo] -lappend ans [list out {unset -f funcfoo;}] +lappend ans [list out {unset -f funcfoo 2>/dev/null || true;}] lappend ans [list out {complete -r cmd;}] testouterr_cmd bash {load source-sh/1} $ans {} unsetenv_var TESTSUITE_ENABLE_SITECONFIG_SOURCESHBASHUNSET diff --git a/testsuite/modules.50-cmds/610-abort_on_error-unload.exp b/testsuite/modules.50-cmds/610-abort_on_error-unload.exp index 083ee07c3..0acde47ea 100644 --- a/testsuite/modules.50-cmds/610-abort_on_error-unload.exp +++ b/testsuite/modules.50-cmds/610-abort_on_error-unload.exp @@ -36,7 +36,7 @@ lappend ans_continue [list set LOADEDMODULES err/1.0] lappend ans_continue [list set _LMFILES_ $mp/err/1.0] lappend ans_continue [list unset TS] lappend ans_continue [list unalias alall] -lappend ans_continue [list out {unset -f funcall;}] +lappend ans_continue [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_continue [list out {complete -r compall;}] lappend ans_continue [list out all-out] lappend ans_continue [list ERR] @@ -48,7 +48,7 @@ lappend ans_forced [list unset _LMFILES_] lappend ans_forced [list unset LOADEDMODULES] lappend ans_forced [list unset TS] lappend ans_forced [list unalias alall] -lappend ans_forced [list out {unset -f funcall;}] +lappend ans_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_forced [list out {complete -r compall;}] lappend ans_forced [list out all-out] @@ -60,7 +60,7 @@ lappend ans_forced_tag [list unset LOADEDMODULES] lappend ans_forced_tag [list unset __MODULES_LMTAG] lappend ans_forced_tag [list unset TS] lappend ans_forced_tag [list unalias alall] -lappend ans_forced_tag [list out {unset -f funcall;}] +lappend ans_forced_tag [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_forced_tag [list out {complete -r compall;}] lappend ans_forced_tag [list out all-out] @@ -73,7 +73,7 @@ lappend ans_depre_error [list set LOADEDMODULES foo/1.0:err/1.0] lappend ans_depre_error [list set _LMFILES_ $mp/foo/1.0:$mp/err/1.0] lappend ans_depre_error [list unset TS] lappend ans_depre_error [list unalias alall] -lappend ans_depre_error [list out {unset -f funcall;}] +lappend ans_depre_error [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_error [list out {complete -r compall;}] lappend ans_depre_error [list out all-out] lappend ans_depre_error [list ERR] @@ -88,7 +88,7 @@ lappend ans_depre_error_force [list unset _LMFILES_] lappend ans_depre_error_force [list unset __MODULES_LMPREREQ] lappend ans_depre_error_force [list unset TS] lappend ans_depre_error_force [list unalias alall] -lappend ans_depre_error_force [list out {unset -f funcall;}] +lappend ans_depre_error_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_error_force [list out {complete -r compall;}] lappend ans_depre_error_force [list out all-out] lappend ans_depre_error_force [list ERR] @@ -100,7 +100,7 @@ lappend ans_depre_exit [list set _LMFILES_ $mp/setenv/1.0:$mp/foo/1.0:$mp/err/1. lappend ans_depre_exit [list set LOADEDMODULES setenv/1.0:foo/1.0:err/1.0] lappend ans_depre_exit [list unset TS] lappend ans_depre_exit [list unalias alall] -lappend ans_depre_exit [list out {unset -f funcall;}] +lappend ans_depre_exit [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_exit [list out {complete -r compall;}] lappend ans_depre_exit [list out all-out] lappend ans_depre_exit [list ERR] @@ -113,7 +113,7 @@ lappend ans_depre_exit_force [list set _LMFILES_ $mp/setenv/1.0] lappend ans_depre_exit_force [list set LOADEDMODULES setenv/1.0] lappend ans_depre_exit_force [list unset TS] lappend ans_depre_exit_force [list unalias alall] -lappend ans_depre_exit_force [list out {unset -f funcall;}] +lappend ans_depre_exit_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_exit_force [list out {complete -r compall;}] lappend ans_depre_exit_force [list out all-out] lappend ans_depre_exit_force [list ERR] @@ -128,7 +128,7 @@ lappend ans_depre_unload_error_force [list set _LMFILES_ $mp/err/1.0] lappend ans_depre_unload_error_force [list set LOADEDMODULES err/1.0] lappend ans_depre_unload_error_force [list unset TS] lappend ans_depre_unload_error_force [list unalias alall] -lappend ans_depre_unload_error_force [list out {unset -f funcall;}] +lappend ans_depre_unload_error_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_unload_error_force [list out {complete -r compall;}] lappend ans_depre_unload_error_force [list out all-out] @@ -144,7 +144,7 @@ lappend ans_depun_error_force [list unset _LMFILES_] lappend ans_depun_error_force [list unset LOADEDMODULES] lappend ans_depun_error_force [list unset TS] lappend ans_depun_error_force [list unalias alall] -lappend ans_depun_error_force [list out {unset -f funcall;}] +lappend ans_depun_error_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depun_error_force [list out {complete -r compall;}] lappend ans_depun_error_force [list out all-out] @@ -155,7 +155,7 @@ lappend ans_not_loaded [list set _LMFILES_ $mp/err/1.0] lappend ans_not_loaded [list set LOADEDMODULES err/1.0] lappend ans_not_loaded [list unset TS] lappend ans_not_loaded [list unalias alall] -lappend ans_not_loaded [list out {unset -f funcall;}] +lappend ans_not_loaded [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_not_loaded [list out {complete -r compall;}] lappend ans_not_loaded [list out all-out] diff --git a/testsuite/modules.50-cmds/611-abort_on_error-ml_unload.exp b/testsuite/modules.50-cmds/611-abort_on_error-ml_unload.exp index 793ef7fef..da2ed2dca 100644 --- a/testsuite/modules.50-cmds/611-abort_on_error-ml_unload.exp +++ b/testsuite/modules.50-cmds/611-abort_on_error-ml_unload.exp @@ -36,7 +36,7 @@ lappend ans_forced [list unset _LMFILES_] lappend ans_forced [list unset LOADEDMODULES] lappend ans_forced [list unset TS] lappend ans_forced [list unalias alall] -lappend ans_forced [list out {unset -f funcall;}] +lappend ans_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_forced [list out {complete -r compall;}] lappend ans_forced [list out all-out] @@ -48,7 +48,7 @@ lappend ans_forced_tag [list unset LOADEDMODULES] lappend ans_forced_tag [list unset __MODULES_LMTAG] lappend ans_forced_tag [list unset TS] lappend ans_forced_tag [list unalias alall] -lappend ans_forced_tag [list out {unset -f funcall;}] +lappend ans_forced_tag [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_forced_tag [list out {complete -r compall;}] lappend ans_forced_tag [list out all-out] @@ -62,7 +62,7 @@ lappend ans_depre_error_force [list unset _LMFILES_] lappend ans_depre_error_force [list unset __MODULES_LMPREREQ] lappend ans_depre_error_force [list unset TS] lappend ans_depre_error_force [list unalias alall] -lappend ans_depre_error_force [list out {unset -f funcall;}] +lappend ans_depre_error_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_error_force [list out {complete -r compall;}] lappend ans_depre_error_force [list out all-out] lappend ans_depre_error_force [list ERR] @@ -77,7 +77,7 @@ lappend ans_depre_unload_error_force [list set _LMFILES_ $mp/err/1.0] lappend ans_depre_unload_error_force [list set LOADEDMODULES err/1.0] lappend ans_depre_unload_error_force [list unset TS] lappend ans_depre_unload_error_force [list unalias alall] -lappend ans_depre_unload_error_force [list out {unset -f funcall;}] +lappend ans_depre_unload_error_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_unload_error_force [list out {complete -r compall;}] lappend ans_depre_unload_error_force [list out all-out] @@ -91,7 +91,7 @@ lappend ans_depun_error_force [list unset _LMFILES_] lappend ans_depun_error_force [list unset LOADEDMODULES] lappend ans_depun_error_force [list unset TS] lappend ans_depun_error_force [list unalias alall] -lappend ans_depun_error_force [list out {unset -f funcall;}] +lappend ans_depun_error_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depun_error_force [list out {complete -r compall;}] lappend ans_depun_error_force [list out all-out] @@ -102,7 +102,7 @@ lappend ans_not_loaded [list set _LMFILES_ $mp/err/1.0] lappend ans_not_loaded [list set LOADEDMODULES err/1.0] lappend ans_not_loaded [list unset TS] lappend ans_not_loaded [list unalias alall] -lappend ans_not_loaded [list out {unset -f funcall;}] +lappend ans_not_loaded [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_not_loaded [list out {complete -r compall;}] lappend ans_not_loaded [list out all-out] @@ -128,7 +128,7 @@ lappend ans_exit_forced [list set _LMFILES_ $mp/setenv/1.0] lappend ans_exit_forced [list set LOADEDMODULES setenv/1.0] lappend ans_exit_forced [list unset TS] lappend ans_exit_forced [list unalias alall] -lappend ans_exit_forced [list out {unset -f funcall;}] +lappend ans_exit_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_exit_forced [list out {complete -r compall;}] lappend ans_exit_forced [list out all-out] lappend ans_exit_forced [list ERR] @@ -140,7 +140,7 @@ lappend ans_supersticky_forced [list set LOADEDMODULES err/1.0] lappend ans_supersticky_forced [list set _LMFILES_ $mp/err/1.0] lappend ans_supersticky_forced [list unset TS] lappend ans_supersticky_forced [list unalias alall] -lappend ans_supersticky_forced [list out {unset -f funcall;}] +lappend ans_supersticky_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_supersticky_forced [list out {complete -r compall;}] lappend ans_supersticky_forced [list out all-out] lappend ans_supersticky_forced [list ERR] diff --git a/testsuite/modules.50-cmds/613-abort_on_error-purge.exp b/testsuite/modules.50-cmds/613-abort_on_error-purge.exp index fe24a59aa..dd6485e95 100644 --- a/testsuite/modules.50-cmds/613-abort_on_error-purge.exp +++ b/testsuite/modules.50-cmds/613-abort_on_error-purge.exp @@ -36,7 +36,7 @@ lappend ans_forced [list unset _LMFILES_] lappend ans_forced [list unset LOADEDMODULES] lappend ans_forced [list unset TS] lappend ans_forced [list unalias alall] -lappend ans_forced [list out {unset -f funcall;}] +lappend ans_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_forced [list out {complete -r compall;}] lappend ans_forced [list out all-out] @@ -48,7 +48,7 @@ lappend ans_forced_tag [list unset LOADEDMODULES] lappend ans_forced_tag [list unset __MODULES_LMTAG] lappend ans_forced_tag [list unset TS] lappend ans_forced_tag [list unalias alall] -lappend ans_forced_tag [list out {unset -f funcall;}] +lappend ans_forced_tag [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_forced_tag [list out {complete -r compall;}] lappend ans_forced_tag [list out all-out] @@ -62,7 +62,7 @@ lappend ans_depre [list unset _LMFILES_] lappend ans_depre [list unset LOADEDMODULES] lappend ans_depre [list unset TS] lappend ans_depre [list unalias alall] -lappend ans_depre [list out {unset -f funcall;}] +lappend ans_depre [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre [list out {complete -r compall;}] lappend ans_depre [list out all-out] @@ -75,7 +75,7 @@ lappend ans_continue [list set LOADEDMODULES err/1.0] lappend ans_continue [list set _LMFILES_ $mp/err/1.0] lappend ans_continue [list unset TS] lappend ans_continue [list unalias alall] -lappend ans_continue [list out {unset -f funcall;}] +lappend ans_continue [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_continue [list out {complete -r compall;}] lappend ans_continue [list out all-out] lappend ans_continue [list ERR] @@ -89,7 +89,7 @@ lappend ans_depre_continue [list set LOADEDMODULES err/1.0] lappend ans_depre_continue [list set _LMFILES_ $mp/err/1.0] lappend ans_depre_continue [list unset TS] lappend ans_depre_continue [list unalias alall] -lappend ans_depre_continue [list out {unset -f funcall;}] +lappend ans_depre_continue [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depre_continue [list out {complete -r compall;}] lappend ans_depre_continue [list out all-out] lappend ans_depre_continue [list ERR] @@ -103,7 +103,7 @@ lappend ans_depun_continue [list set LOADEDMODULES foo/1.0:err/1.0] lappend ans_depun_continue [list set _LMFILES_ $mp/foo/1.0:$mp/err/1.0] lappend ans_depun_continue [list unset TS] lappend ans_depun_continue [list unalias alall] -lappend ans_depun_continue [list out {unset -f funcall;}] +lappend ans_depun_continue [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_depun_continue [list out {complete -r compall;}] lappend ans_depun_continue [list out all-out] lappend ans_depun_continue [list ERR] @@ -119,7 +119,7 @@ lappend ans_supersticky_forced [list set LOADEDMODULES err/1.0] lappend ans_supersticky_forced [list set _LMFILES_ $mp/err/1.0] lappend ans_supersticky_forced [list unset TS] lappend ans_supersticky_forced [list unalias alall] -lappend ans_supersticky_forced [list out {unset -f funcall;}] +lappend ans_supersticky_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_supersticky_forced [list out {complete -r compall;}] lappend ans_supersticky_forced [list out all-out] lappend ans_supersticky_forced [list ERR] diff --git a/testsuite/modules.50-cmds/614-abort_on_error-reload.exp b/testsuite/modules.50-cmds/614-abort_on_error-reload.exp index 846b24820..b3fcbd36e 100644 --- a/testsuite/modules.50-cmds/614-abort_on_error-reload.exp +++ b/testsuite/modules.50-cmds/614-abort_on_error-reload.exp @@ -135,7 +135,7 @@ lappend ans_load_fail_exit_forced [list set _LMFILES_ $mp/foo/1.0] lappend ans_load_fail_exit_forced [list set LOADEDMODULES foo/1.0] lappend ans_load_fail_exit_forced [list unset TS] lappend ans_load_fail_exit_forced [list unalias alall] -lappend ans_load_fail_exit_forced [list out {unset -f funcall;}] +lappend ans_load_fail_exit_forced [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_load_fail_exit_forced [list out {complete -r compall;}] lappend ans_load_fail_exit_forced [list out all-out] lappend ans_load_fail_exit_forced [list ERR] @@ -169,7 +169,7 @@ lappend ans_both_fail_depre_exit_force [list set _LMFILES_ $mp/setenv/1.0:$mp/fo lappend ans_both_fail_depre_exit_force [list set LOADEDMODULES setenv/1.0:foo/1.0] lappend ans_both_fail_depre_exit_force [list unset TS] lappend ans_both_fail_depre_exit_force [list unalias alall] -lappend ans_both_fail_depre_exit_force [list out {unset -f funcall;}] +lappend ans_both_fail_depre_exit_force [list out {unset -f funcall 2>/dev/null || true;}] lappend ans_both_fail_depre_exit_force [list out {complete -r compall;}] lappend ans_both_fail_depre_exit_force [list out all-out] lappend ans_both_fail_depre_exit_force [list ERR]