From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Wed, 28 Jul 2021 15:06:23 +0200 Subject: [LTP] [PATCH v1] lib/tst_test.sh: skip test if ip returns "Error: Unknown device type" In-Reply-To: References: <20210722063422.18059-1-radoslav.kolev@suse.com> <8b564e10-d87e-aaf0-03a4-1af347f02d4b@suse.com> <8cc8d5bc-b651-8e15-6389-69f36cf6bb49@bell-sw.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it > On 27.07.2021 13:02, Petr Vorel wrote: > > Hi Alexey, Radoslav, > >> Hi Radoslav, > >> On 27.07.2021 11:20, Radoslav Kolev wrote: > >>> On 7/22/21 10:49 AM, Petr Vorel wrote: > >>>> Hi Radoslav, > >>>>> In network stress test groups there are tests expecting > >>>>> CONFIG_NET_IPVTI to be enabled in the kernel, and if it's not they > >>>>> fail. There is a check for VTI support in the ip utility, but not > >>>>> for the kernel. Skip these tests if vti device type is not known by > >>>>> the kernel. > >>>> LGTM. > >>>> Reviewed-by: Petr Vorel > >>> Thanks for the review, Petr! > >>> Alexey, please let me know if you have any comments. > >> What about checking vti drivers in stress/ipsec/ipsec_lib.sh:tst_ipsec_setup_vti() > >> Similar to the checks for xfrm_user driver there... > >> For example: > >> tst_net_run -q "tst_check_drivers ip_vti ip6_vti" || \ > >> tst_brk TCONF "vti driver not available on lhost or rhost" > >> I think this should work for wireguard02 test as well. > > The above LGTM, Radoslav, do you have time to look into it? > > Alexey, do we also accept this patch? IMHO this error should be mostly TCONF and > > it'd work for other possible drivers. > Not sure if we really want to add the new patterns every time the > error message from ip changes. For example depending on the ip/libc > the error can be "Error: Unknown device type." or "RTNETLINK answers: > Not supported". Sure, more effective ways are always welcome. > We could also save the error message in setup by passing the wrong > type and then compare it during the test: > no_dev_msg="$(ip link add ltp0 type ltp0 2>&1)" Yep, that'd be safer. But your original proposal to check ip_vti ip6_vti is IMHO the best solution. Radoslav, would you send a new patch with it? Kind regards, Petr