[LTP] [PATCH] commands/mkswap: Added new testcase to test mkswap(8).

Alexey Kodanev alexey.kodanev@oracle.com
Fri Nov 6 12:54:29 CET 2015


Hi,

On 11/06/2015 08:17 AM, Guangwen Feng wrote:

>>> +            tst_resm TFAIL "'${mkswap_cmd}' failed."
>>> +            cat temp
>>> +            return
>>> +        fi
>>> +    fi
>>> +
>>> +    if [ -n "$device" ]; then
>>> +        mkswap_verify "$mkswap_op" "$op_arg" "$device" "$size"
>>> +        if [ $? -ne 0 ]; then
>>> +            tst_resm TFAIL "'${mkswap_cmd}' failed, not expected."
>>> +            return
>>> +        fi
>>> +    fi
>>> +
>>> +    tst_resm TPASS "'${mkswap_cmd}' passed."
>>> +}
>>> +
>>> +test1()
>>> +{
>>> +    mkswap_test "" "" "$TST_DEVICE"
>>> +}
>> May be it would be better to call mkswap_test() without such wrappers and the for loop in the end.
>>
> Sorry, do you mean just call mkswap_test() straightforward with different arguments for all these tests?

Right, the same way it is done inside each test*().

Best regards,
Alexey


More information about the Ltp mailing list