route{4,6}-rmmod: Filter out ":" and fix typos
PATCH 1/1 route{4,6}-rmmod: Filter out ":" and fix typos
--- testcases/network/stress/route/route4-rmmod | 4 ++-- testcases/network/stress/route/route6-rmmod | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
testcases/network/stress/route/route4-rmmod +2 -2
@@ -164,14 +164,14 @@ do_setup() lhost_module=`ethtool -i $lhost_ifname | grep driver | sed "s/driver:[[:blank:]]*//"` # Chack the other active interface uses the same driver - for ifname in `ifconfig | grep ^eth | awk '{ print $1}'`; do + for ifname in `ifconfig | grep ^eth | awk '{print $1}' | sed "s/://"`; do if [ $lhost_ifname = $ifname ]; then continue fi module=`ethtool -i $ifname | grep driver | sed "s/driver:[[:blank:]]*//"` if [ $lhost_module = $module ]; then - tst_resm TBROK "An active interface $ifname uses the same network deriver $module with the test intreface." + tst_resm TBROK "An active interface $ifname uses the same network driver $module with the test interface." exit $TST_TOTAL fi done
testcases/network/stress/route/route6-rmmod +2 -2
@@ -160,14 +160,14 @@ do_setup() lhost_module=`ethtool -i $lhost_ifname | grep driver | sed "s/driver:[[:blank:]]*//"` # Chack the other active interface uses the same driver - for ifname in `ifconfig | grep ^eth | awk '{ print $1}'`; do + for ifname in `ifconfig | grep ^eth | awk '{print $1}' | sed "s/://"`; do if [ $lhost_ifname = $ifname ]; then continue fi module=`ethtool -i $ifname | grep driver | sed "s/driver:[[:blank:]]*//"` if [ $lhost_module = $module ]; then - tst_resm TBROK "An active interface $ifname uses the same network deriver $module with the test intreface." + tst_resm TBROK "An active interface $ifname uses the same network driver $module with the test interface." exit $TST_TOTAL fi done
Signature · 1 line
1.8.3.1
PATCH 1/1 route{4,6}-rmmod: Filter out ":" and fix typos
Quoted 12 lines · Feiyu Zhu
Reported-by Jin Cao <[email protected]>Signed-off-by Feiyu Zhu <[email protected]>--- testcases/network/stress/route/route4-rmmod | 4 ++-- testcases/network/stress/route/route6-rmmod | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)testcases/network/stress/route/route4-rmmod +0
-0
testcases/network/stress/route/route4-rmmod do_setup() · line 167
Quoted 5 lines
testcases/network/stress/route/route4-rmmod +1
-1@@ -164,14 +164,14 @@ do_setup() lhost_module=`ethtool -i $lhost_ifname | grep driver | sed "s/driver:[[:blank:]]*//"` # Chack the other active interface uses the same driver - for ifname in `ifconfig | grep ^eth | awk '{ print $1}'`; do + for ifname in `ifconfig | grep ^eth | awk '{print $1}' | sed "s/://"`; do
Thanks for fixing it, but it is not enough here. This command is wrong, not only does it use obsolete tool, but also assumes that interface names start with 'eth'. So it skips the check for active connections that already in use with the driver (it is going to remove) for all modern systems.
I think we should at least remove this test from the runtest file until the proper fix. Also this test and route4{6}-redirect are really need to be rewritten with new test API, please have a look at route-change-*.sh.
Quoted 33 lines
testcases/network/stress/route/route4-rmmod +1
-1if [ $lhost_ifname = $ifname ]; then continue fi module=`ethtool -i $ifname | grep driver | sed "s/driver:[[:blank:]]*//"` if [ $lhost_module = $module ]; then - tst_resm TBROK "An active interface $ifname uses the same network deriver $module with the test intreface." + tst_resm TBROK "An active interface $ifname uses the same network driver $module with the test interface." exit $TST_TOTAL fi donetestcases/network/stress/route/route6-rmmod +2
-2@@ -160,14 +160,14 @@ do_setup() lhost_module=`ethtool -i $lhost_ifname | grep driver | sed "s/driver:[[:blank:]]*//"` # Chack the other active interface uses the same driver - for ifname in `ifconfig | grep ^eth | awk '{ print $1}'`; do + for ifname in `ifconfig | grep ^eth | awk '{print $1}' | sed "s/://"`; do if [ $lhost_ifname = $ifname ]; then continue fi module=`ethtool -i $ifname | grep driver | sed "s/driver:[[:blank:]]*//"` if [ $lhost_module = $module ]; then - tst_resm TBROK "An active interface $ifname uses the same network deriver $module with the test intreface." + tst_resm TBROK "An active interface $ifname uses the same network driver $module with the test interface." exit $TST_TOTAL fi done
PATCH 1/1 route{4,6}-rmmod: Filter out ":" and fix typos
Hi Alexey, Feiyu,
Quoted 19 lines · Feiyu Zhu
Quoted 12 lines
Reported-by Jin Cao <[email protected]>Signed-off-by Feiyu Zhu <[email protected]>--- testcases/network/stress/route/route4-rmmod | 4 ++-- testcases/network/stress/route/route6-rmmod | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)testcases/network/stress/route/route4-rmmod +0
-0testcases/network/stress/route/route4-rmmod do_setup() · line 167
Quoted 5 lines
testcases/network/stress/route/route4-rmmod +1
-1@@ -164,14 +164,14 @@ do_setup() lhost_module=`ethtool -i $lhost_ifname | grep driver | sed "s/driver:[[:blank:]]*//"` # Chack the other active interface uses the same driver - for ifname in `ifconfig | grep ^eth | awk '{ print $1}'`; do + for ifname in `ifconfig | grep ^eth | awk '{print $1}' | sed "s/://"`; do
Quoted 5 lines
Thanks for fixing it, but it is not enough here. This command is wrong, not only does it use obsolete tool, but also assumes that interface names start with 'eth'. So it skips the check for active connections that already in use with the driver (it is going to remove) for all modern systems.
+1
Quoted 2 lines
I think we should at least remove this test from the runtest file until the proper fix.
Good idea, I've sent a patch for this.
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
Quoted 3 lines
Also this test and route4{6}-redirect are
really need to be rewritten with new test API, please have a look at route-change-*.sh.
Kind regards,
Petr