Hi,
> > > Also do we want to assert that the dummy0 device is listed in the /sys
> > > inside the namespace?
> >
> > Don't you think that this is sufficient ?
> >
> > ns_exec $NS_HANDLE ip link add dummy0 type dummy || \
> >
> > tst_brkm TBROK "failed to add a new dummy device"
>
> We are testing sysfs in network namespaces, so I'm tepmted to do
> something as:
>
> if [ -d /sys/class/net/dummy0 ]; then
> tst_resm TPASS ...
> else
> tst_resm TFAIL ...
> fi
>
> After sysfs is mounted.
Actually not a bad idea, we will have one more TC. But don't forget
that checking this must be done inside the separated namespace and only
AFTER mounting sysfs, so something like this:
ns_exec $NS_HANDLE test -d /sys/class/net/dummy0
if [ $? -eq 0 ]; then
tst_resm TPASS ...
else
tst_resm TFAIL ...
fi
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list