On 04.08.21 04:47, Hongzhan Chen via Xenomai wrote:
> Before checking net config, rtnet should be ready.
> 
> Signed-off-by: Hongzhan Chen <hongzhan.c...@intel.com>
> 
> diff --git a/testsuite/smokey/net_common/setup.c 
> b/testsuite/smokey/net_common/setup.c
> index 1badabdfb..719d8175f 100644
> --- a/testsuite/smokey/net_common/setup.c
> +++ b/testsuite/smokey/net_common/setup.c
> @@ -408,6 +408,14 @@ int smokey_net_setup(const char *driver, const char 
> *intf, int tested_config,
>       struct sockaddr_in *in_peer = vpeer;
>       struct sockaddr *peer = vpeer;
>  
> +     err = access("/dev/rtnet", F_OK);

Not needed. smokey_net_modprobe() checks /proc/modules and loads only if
the module is missing.

> +     if (err) {
> +             /* device does not exist and load rtnet*/
> +             err = smokey_net_modprobe(MODID_RTNET);
> +             if (err < 0)
> +                     return err;
> +     }
> +
>       err = cobalt_corectl(_CC_COBALT_GET_NET_CONFIG,
>                       &net_config, sizeof(net_config));
>       if (err == -EINVAL)
> 

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux

Reply via email to