[LTP] [PATCH 2/2] network/in6_02: Don't use default value for LHOST_IFACES

Alexey Kodanev alexey.kodanev@oracle.com
Wed Apr 18 16:56:38 CEST 2018


On 04/18/2018 05:13 PM, Petr Vorel wrote:
> Hi Alexey,
> 
>> On 04/17/2018 03:42 PM, Petr Vorel wrote:
>>> in6_02 can be test without help of network.sh. In that case LHOST_IFACES
>>> is not defined and "eth0" is used as default value. This can cause
>>> failures.
> 
>> I think the fix should be before the conversion to the new API, otherwise
>> it unnecessary depends on it.
> Agree, I'll fix it.
> 
> ...
>>>  	for (i = 0; i < ARRAY_SIZE(test_case); ++i) {
>>> +		if (test_case[i].name == NULL)
>>> +			continue;
> 
>> What about using TCONF if it skips the test-case because
>> LHOST_IFACE is not defined?
> I wanted to keep at least testing of if_nametoindex("lo").
> Would be overkill in case of TCONF to create in6_02.sh which would just load tst_net.sh?
> I don't like the fact, that network C tests depend on being run via network.sh (unlike
> shell network tests).

Why it depends on network.sh? LHOST_IFACE is just an environment variable.
It can be defined on the test machine already before the test is started,
or with tst_net.sh.

I mean, using TCONF for the LHOST_IFACE test-case, when the test in6_02,
doesn't find the variable and skips it, then proceeds with the rest of
test-cases.


More information about the ltp mailing list