Neng Xue
2016-09-08 00:06:07 UTC
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
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
_______________________________________________
krbdev mailing list ***@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev
Neng Xue
Oracle Solaris Software Engineer
Santa Clara, CA, USA
_______________________________________________
krbdev mailing list ***@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev