ts: test dot mod targetted by module-forbid in 20/{118,119}

This commit is contained in:
Xavier Delaruelle
2020-08-14 14:20:02 +02:00
parent 2fb7e883ee
commit 9698fa32db
3 changed files with 27 additions and 0 deletions

View File

@@ -138,6 +138,10 @@ if {[info exists env(TESTSUITE_HIDE1_CASC4_SET10)]} {
module-forbid hide1/5.0
}
if {[info exists env(TESTSUITE_HIDE4_CASC2_SET1)]} {
module-forbid hide4
}
# 20/115 module-forbid tests
if {[info exists env(TESTSUITE_FORBID2_SET8)]} {
module-forbid hide2@1.3 hide2@1.4

View File

@@ -83,6 +83,14 @@ nanfoo/nan -> nanfoo/1
testouterr_cmd sh {ml avail -a -t hide1@2:4} OK $mp:\nhide1/2.0\nhide1/2.1\nhide1/2.2\nhide1/3.0\nhide1/3.2\nhide1/4.0
testouterr_cmd_re sh {ml whatis -a hide3} ERR $err_path'hide3'
# test with dot named module declared forbidden
setenv_var TESTSUITE_HIDE4_CASC2_SET1 1
testouterr_cmd sh {avail -a -t -C /.} OK "$mp:
extdfl/.1.3.3
extdfl/.1.3.4
nocase/.hidden"
unsetenv_var TESTSUITE_HIDE4_CASC2_SET1
# cannot test access if cannot change file permission
if {!$is_file_perms_editable} {
send_user "\tskipping access tests as file permissions cannot be changed\n"

View File

@@ -241,6 +241,21 @@ testouterr_cmd sh {avail -t hide1@5.0} OK {}
unsetenv_var TESTSUITE_HIDE1_CASC4_SET10
# dot named module targetted by module-forbid statement
# module-forbid wins over dot hiding
setenv_var TESTSUITE_HIDE4_CASC2_SET1 1
testouterr_cmd sh {avail hide4} OK {}
testouterr_cmd sh {avail -t hide4/.1.0} OK {}
testouterr_cmd sh {load hide4} ERR $err_path'hide4'
set ans [list]
lappend ans [list setpath LOADEDMODULES hide4/.1.0]
lappend ans [list setpath _LMFILES_ $mp/hide4/.1.0]
testouterr_cmd sh {load hide4/.1.0} ERR [err_accessdenied hide4/.1.0]
testouterr_cmd sh {whatis hide4} ERR $err_path'hide4'
testouterr_cmd_re sh {whatis hide4/.1.0} ERR [err_accessdenied hide4/.1.0]
unsetenv_var TESTSUITE_HIDE4_CASC2_SET1
#
# Cleanup
#