route{4, 6}-rmmod: Declare variables before using them
PATCH v2 1/1 route{4, 6}-rmmod: Declare variables before using them
When running route4-rmmod case, it reports the following error:/opt/ltp/testcases/bin/route4-rmmod: line 100: lhost_module: unbound variable.
It fails because "set -u" is used in .testcases/lib/cmdlib.sh and "set -u" treats unset variables and parameters as errors.
Reviewed-by Petr Vorel <[email protected]>
Signed-off-by Feiyu Zhu <[email protected]>
--- testcases/network/stress/route/route4-rmmod | 3 +++ testcases/network/stress/route/route6-rmmod | 3 +++ 2 files changed, 6 insertions(+)
testcases/network/stress/route/route4-rmmod +3 -0
@@ -125,6 +125,9 @@ do_setup() exit $TST_TOTAL fi + # The module name of the interface at the local host + lhost_module= + # Make sure to clean up do_cleanup
testcases/network/stress/route/route6-rmmod +3 -0
@@ -121,6 +121,9 @@ do_setup() exit $TST_TOTAL fi + # The module name of the interface at the local host + lhost_module= + # Make sure to clean up do_cleanup
Signature · 1 line
1.8.3.1
PATCH v2 1/1 route{4, 6}-rmmod: Declare variables before using them
Hi Feiyu,
Quoted 5 lines
When running route4-rmmod case, it reports the following error:
/opt/ltp/testcases/bin/route4-rmmod: line 100:lhost_module: unbound variable.It fails because "set -u" is used in
.testcases/lib/cmdlib.shand "set -u" treats unset variables and parameters as errors.
Thanks a lot for update, merged.
Kind regards,
Petr