[LTP] [RESEND 1/2] network/lib6/asapi_02: Fix T_WILLBLOCK/T_WILLPASS no FAIL/PASS bug

Yang Xu xuyang2018.jy@fujitsu.com
Wed Apr 12 04:59:01 CEST 2023


Currently, icmp6_ft will skip check between rv and expetec result when testing T_WILLBLOCK/T_WILLPASS case.

the result log as below:
asapi_02    1  TPASS  :  ICMP6_FILTER_SETPASS s 20 f 20
asapi_02    2  TPASS  :  ICMP6_FILTER_SETPASS s 20 f 21
asapi_02    3  TPASS  :  ICMP6_FILTER_SETBLOCK s 20 f 20
asapi_02    4  TPASS  :  ICMP6_FILTER_SETBLOCK s 20 f 21
asapi_02    5  TPASS  :  ICMP6_FILTER_PASSALL s 20
asapi_02    6  TPASS  :  ICMP6_FILTER_PASSALL s 20
asapi_02    7  TPASS  :  ICMP6_FILTER_BLOCKALL s 20
asapi_02    8  TPASS  :  ICMP6_FILTER_BLOCKALL s 20

after removing the wrong else judgment, the result log as below:
asapi_02    1  TPASS  :  ICMP6_FILTER_SETPASS s 20 f 20
asapi_02    2  TPASS  :  ICMP6_FILTER_SETPASS s 20 f 21
asapi_02    3  TPASS  :  ICMP6_FILTER_SETBLOCK s 20 f 20
asapi_02    4  TPASS  :  ICMP6_FILTER_SETBLOCK s 20 f 21
asapi_02    5  TPASS  :  ICMP6_FILTER_PASSALL s 20
asapi_02    6  TPASS  :  ICMP6_FILTER_PASSALL s 20
asapi_02    7  TPASS  :  ICMP6_FILTER_BLOCKALL s 20
asapi_02    8  TPASS  :  ICMP6_FILTER_BLOCKALL s 20
asapi_02    9  TPASS  :  ICMP6_FILTER_WILLBLOCK s 20 f 21
asapi_02   10  TPASS  :  ICMP6_FILTER_WILLBLOCK s 20 f 20
asapi_02   11  TPASS  :  ICMP6_FILTER_WILLPASS s 20 f 21
asapi_02   12  TPASS  :  ICMP6_FILTER_WILLPASS s 22 f 22

Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 testcases/network/lib6/asapi_02.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/testcases/network/lib6/asapi_02.c b/testcases/network/lib6/asapi_02.c
index f9843346c..13b3b2b70 100644
--- a/testcases/network/lib6/asapi_02.c
+++ b/testcases/network/lib6/asapi_02.c
@@ -246,8 +246,6 @@ static void icmp6_ft(void)
 			if (ic6_send1(ftab[i].ft_tname, ftab[i].ft_sndtype))
 				continue;
 			rv = ic6_recv1(ftab[i].ft_tname, sall, sf);
-		} else {
-			rv = -1;
 		}
 
 		if (rv < 0)
-- 
2.39.1



More information about the ltp mailing list