send "ovsec_kadm_init admin null \$OVSEC_KADM_ADMIN_SERVICE null \$OVSEC_KADM_STRUCT_VERSION \$OVSEC_KADM_API_VERSION_1 server_handle\n"
expect {
- {Enter password:} { }
+ -re "assword\[^\r\n\]*: *" { }
eof {
fail "$test: eof instead of password prompt"
api_exit
send "ovsec_kadm_init admin \"\" \$OVSEC_KADM_ADMIN_SERVICE null \$OVSEC_KADM_STRUCT_VERSION \$OVSEC_KADM_API_VERSION_1 server_handle\n"
expect {
- {Enter password:} { }
- -re "key:$" { }
+ -re "assword\[^\r\n\]*: *" { }
+ -re "\n\[^\n\]+key:\[^\n\]*$" { }
eof {
fail "$test: eof instead of password prompt"
api_exit
}]
send "\n"
expect {
- -re ":$" { set prompting 1}
+ -re "\n\[^\n\]+:\[^\n\]*$" { set prompting 1}
-re "\nOK .*$prompt$" { fail "$test: premature success" }
-re "\nERROR .*$prompt$" { fail "$test: premature failure" }
timeout { fail "$test: timeout" }
}]
send "\n"
expect {
- -re ":$" { set prompting 1}
+ -re "\n\[^\n\]+:\[^\n\]*$" { set prompting 1}
-re "\nOK .*$prompt$" { fail "$test: premature success" }
-re "\nERROR .*$prompt$" { fail "$test: premature failure" }
timeout { fail "$test: timeout" }