Menu

#149 undefined variable in tcp4-uni-basic01

open
nobody
Testcases (113)
5
2009-11-13
2009-11-13
No

I am using ltp-full-20091031

A lot of the TCP tests involving packet loss fail with this error:

./tcp4-uni-basic01: line 394: netem_param: unbound variable

The reason is that strict checking for undefined variables is enabled with "set -u", but the variable netem_param is not always defined before testing its contents.

The fix I have applied is to initialize the netem_param variable with an empty string. In tcp4-uni-basic01 add around line 381:

netem_param=""

Now the tests pass without problem.

Discussion


Log in to post a comment.