diff mbox

linux-generic: validation: pktio: report test as skipped when setup fails

Message ID 1450443352-12711-1-git-send-email-stuart.haslam@linaro.org
State Accepted
Commit 0ccd431e70dd69a2ada4cf34d4e6591cf42721e0
Headers show

Commit Message

Stuart Haslam Dec. 18, 2015, 12:55 p.m. UTC
If setting up the veth interfaces used for validation testing of socket
based pktios fails (e.g. CONFIG_VETH missing from the kernel), report
the test as skipped. Previously the test would be run anyway, resulting
in a lot of errors which aren't particularly easy to interpret.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 platform/linux-generic/test/pktio/pktio_run | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Christophe Milard Dec. 18, 2015, 5:41 p.m. UTC | #1
On 2015-12-18 12:55, Stuart Haslam wrote:
> If setting up the veth interfaces used for validation testing of socket
> based pktios fails (e.g. CONFIG_VETH missing from the kernel), report
> the test as skipped. Previously the test would be run anyway, resulting
> in a lot of errors which aren't particularly easy to interpret.
> 
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>

Reviewed-by: Christophe Milard <christophe.milard@linaro.org>

> ---
>  platform/linux-generic/test/pktio/pktio_run | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/platform/linux-generic/test/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run
> index 3f73556..7029ab2 100755
> --- a/platform/linux-generic/test/pktio/pktio_run
> +++ b/platform/linux-generic/test/pktio/pktio_run
> @@ -87,6 +87,10 @@ run()
>  		# no interfaces specified, use default veth interfaces
>  		# setup by the pktio_env script
>  		setup_pktio_env clean
> +		if [ $? != 0 ]; then
> +			echo "Failed to setup test environment, skipping test."
> +			exit $TEST_SKIPPED
> +		fi
>  		export ODP_PKTIO_IF0=$IF0
>  		export ODP_PKTIO_IF1=$IF1
>  	fi
> -- 
> 2.1.1
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
Maxim Uvarov Dec. 22, 2015, 6:22 a.m. UTC | #2
Merged,
Maxim.

On 12/18/2015 20:41, Christophe Milard wrote:
> On 2015-12-18 12:55, Stuart Haslam wrote:
>> If setting up the veth interfaces used for validation testing of socket
>> based pktios fails (e.g. CONFIG_VETH missing from the kernel), report
>> the test as skipped. Previously the test would be run anyway, resulting
>> in a lot of errors which aren't particularly easy to interpret.
>>
>> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> Reviewed-by: Christophe Milard <christophe.milard@linaro.org>
>
>> ---
>>   platform/linux-generic/test/pktio/pktio_run | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/platform/linux-generic/test/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run
>> index 3f73556..7029ab2 100755
>> --- a/platform/linux-generic/test/pktio/pktio_run
>> +++ b/platform/linux-generic/test/pktio/pktio_run
>> @@ -87,6 +87,10 @@ run()
>>   		# no interfaces specified, use default veth interfaces
>>   		# setup by the pktio_env script
>>   		setup_pktio_env clean
>> +		if [ $? != 0 ]; then
>> +			echo "Failed to setup test environment, skipping test."
>> +			exit $TEST_SKIPPED
>> +		fi
>>   		export ODP_PKTIO_IF0=$IF0
>>   		export ODP_PKTIO_IF1=$IF1
>>   	fi
>> -- 
>> 2.1.1
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/test/pktio/pktio_run b/platform/linux-generic/test/pktio/pktio_run
index 3f73556..7029ab2 100755
--- a/platform/linux-generic/test/pktio/pktio_run
+++ b/platform/linux-generic/test/pktio/pktio_run
@@ -87,6 +87,10 @@  run()
 		# no interfaces specified, use default veth interfaces
 		# setup by the pktio_env script
 		setup_pktio_env clean
+		if [ $? != 0 ]; then
+			echo "Failed to setup test environment, skipping test."
+			exit $TEST_SKIPPED
+		fi
 		export ODP_PKTIO_IF0=$IF0
 		export ODP_PKTIO_IF1=$IF1
 	fi