Special character in hostname may cause problem for built-in test suite
Neng Xue
neng.xue at oracle.com
Wed Sep 7 20:06:07 EDT 2016
Hi,
Recently I noticed there is a problem running MIT built-in test suite on
a machine with special symbols in its hostname.
To be specific:
My machine's hostname is neng-kz
In this case, codes located in line 413 from
src/lib/kadm5/unit-test/api.current/init-v2.exp
will time/error out since it can only match special symbols '/@' as
specified in the regular expression. In my case, the hostname contains
symbol '-' which caused the expect script to error out.
-------------------------------------
send "puts \$KADM5_ADMIN_SERVICE\n"
expect {
-re "(\[a-zA-Z/@\]+)\n$prompt" {
set KADM5_ADMIN_SERVICE $expect_out(1,string)
}
default {
error_and_restart "$test: timeout/eof getting admin_service"
return
}
}
send "puts \$KADM5_CHANGEPW_SERVICE\n"
expect {
-re "(\[a-zA-Z/@\]+)\n$prompt" {
set KADM5_CHANGEPW_SERVICE $expect_out(1,string)
}
default {
error_and_restart "$test: timeout/eof getting changepw_service"
return
}
}
-------------------------------------
I confirmed that if I added '-' to the regular expression, the test
suite can match and pass.
So is this the expected behavior or can I work around it by not changing
my machine's hostname? Thanks.
Best
--
Neng Xue
Oracle Solaris Software Engineer
Santa Clara, CA, USA
More information about the krbdev
mailing list