[LTP] [PATCH] ipsec_lib.sh: test xfrm_user driver locally before rhost
Alexey Kodanev
alexey.kodanev@oracle.com
Wed Dec 16 12:10:34 CET 2020
On 16.12.2020 13:55, Köry Maincent wrote:
> Hello Alexey,
>
> On Wed, 16 Dec 2020 13:31:36 +0300
> Alexey Kodanev <alexey.kodanev@oracle.com> wrote:
>
>> On 16.12.2020 12:40, Kory Maincent wrote:
>>> First, test the presence of the driver locally to avoid a misleading TWARN
>>> from tst_net_run in case of driver not present.
>>>
>>> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
>>> ---
>>> testcases/network/stress/ipsec/ipsec_lib.sh | 5 +++--
>>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/testcases/network/stress/ipsec/ipsec_lib.sh
>>> b/testcases/network/stress/ipsec/ipsec_lib.sh index 198c9315d..1db5fc6af
>>> 100644 --- a/testcases/network/stress/ipsec/ipsec_lib.sh
>>> +++ b/testcases/network/stress/ipsec/ipsec_lib.sh
>>> @@ -83,8 +83,9 @@ ipsec_lib_setup()
>>> ALGR=
>>>
>>> if [ -n "$IPSEC_MODE" ]; then
>>> - tst_net_run "tst_check_drivers xfrm_user" || \
>>> - tst_brk TCONF "xfrm_user driver not available on
>>> lhost or rhost"
>>> + tst_check_drivers xfrm_user || tst_brk TCONF "xfrm_user
>>> driver not available"
>>> + tst_rhost_run -c "tst_check_drivers xfrm_user" || \
>>> + tst_brk TCONF "xfrm_user driver not available on
>>> rhost"
>>
>> Hi Kory,
>>
>> tst_net_run() checks the driver locally first, so I don't
>> quite understand why do exactly the same what tst_net_run()
>> supposed to do?
>
> Indeed but it returns a TWARN because the command "tst_check_drivers xfrm_user"
> not end properly, but in fact it should return a TCONF due to the missing
> xfrm_drivers.
> In the final result file we got a FAIL error with the value 36 in place of a
> CONF with value 32 which should be the right message.
>
Perhaps it needs -q option here:
tst_net_run -q "tst_check_drivers xfrm_user" ... so it skips TWARN?
More information about the ltp
mailing list