Message ID | 1452693127-28492-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Accepted |
Commit | b36af9d94ec28efbabb1f4402f83bacf96706ad5 |
Headers | show |
On Wed, Jan 13, 2016 at 08:52:07AM -0500, Mike Holmes wrote: > The script did not check that the odp_generator was present. > Updates to ensure the clean up is always called at EXIT > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> > --- > v2: > Use stuarts suggetion to clean up the interfaces on EXIT > > test/performance/odp_l2fwd_run | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run > index 001d8c2..cab97a8 100755 > --- a/test/performance/odp_l2fwd_run > +++ b/test/performance/odp_l2fwd_run > @@ -48,12 +48,20 @@ fi > > run_l2fwd() > { > - setup_pktio_env > + setup_pktio_env clean # install trap to call cleanup_pktio_env > + > if [ $? -ne 0 ]; then > echo "setup_pktio_env error $?" > exit $TEST_SKIPPED > fi > > + type odp_generator > /dev/null > + if [ $? -ne 0 ]; then > + echo "odp_generator not installed. Aborting." > + cleanup_pktio_env > + exit 1 > + fi > + > #@todo: limit odp_generator to cores > #https://bugs.linaro.org/show_bug.cgi?id=1398 > (odp_generator${EXEEXT} -I $IF0 \ > @@ -88,9 +96,6 @@ run_l2fwd() > > rm -f $LOG > cleanup_pktio_env > - if [ $? -ne 0 ]; then > - echo "cleanup_pktio_env error $?" > - fi > > exit $ret > } > -- > 2.5.0 >
Merged, Maxim. On 01/13/2016 18:27, Stuart Haslam wrote: > On Wed, Jan 13, 2016 at 08:52:07AM -0500, Mike Holmes wrote: >> The script did not check that the odp_generator was present. >> Updates to ensure the clean up is always called at EXIT >> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > Reviewed-by: Stuart Haslam <stuart.haslam@linaro.org> > >> --- >> v2: >> Use stuarts suggetion to clean up the interfaces on EXIT >> >> test/performance/odp_l2fwd_run | 13 +++++++++---- >> 1 file changed, 9 insertions(+), 4 deletions(-) >> >> diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run >> index 001d8c2..cab97a8 100755 >> --- a/test/performance/odp_l2fwd_run >> +++ b/test/performance/odp_l2fwd_run >> @@ -48,12 +48,20 @@ fi >> >> run_l2fwd() >> { >> - setup_pktio_env >> + setup_pktio_env clean # install trap to call cleanup_pktio_env >> + >> if [ $? -ne 0 ]; then >> echo "setup_pktio_env error $?" >> exit $TEST_SKIPPED >> fi >> >> + type odp_generator > /dev/null >> + if [ $? -ne 0 ]; then >> + echo "odp_generator not installed. Aborting." >> + cleanup_pktio_env >> + exit 1 >> + fi >> + >> #@todo: limit odp_generator to cores >> #https://bugs.linaro.org/show_bug.cgi?id=1398 >> (odp_generator${EXEEXT} -I $IF0 \ >> @@ -88,9 +96,6 @@ run_l2fwd() >> >> rm -f $LOG >> cleanup_pktio_env >> - if [ $? -ne 0 ]; then >> - echo "cleanup_pktio_env error $?" >> - fi >> >> exit $ret >> } >> -- >> 2.5.0 >> > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/test/performance/odp_l2fwd_run b/test/performance/odp_l2fwd_run index 001d8c2..cab97a8 100755 --- a/test/performance/odp_l2fwd_run +++ b/test/performance/odp_l2fwd_run @@ -48,12 +48,20 @@ fi run_l2fwd() { - setup_pktio_env + setup_pktio_env clean # install trap to call cleanup_pktio_env + if [ $? -ne 0 ]; then echo "setup_pktio_env error $?" exit $TEST_SKIPPED fi + type odp_generator > /dev/null + if [ $? -ne 0 ]; then + echo "odp_generator not installed. Aborting." + cleanup_pktio_env + exit 1 + fi + #@todo: limit odp_generator to cores #https://bugs.linaro.org/show_bug.cgi?id=1398 (odp_generator${EXEEXT} -I $IF0 \ @@ -88,9 +96,6 @@ run_l2fwd() rm -f $LOG cleanup_pktio_env - if [ $? -ne 0 ]; then - echo "cleanup_pktio_env error $?" - fi exit $ret }
The script did not check that the odp_generator was present. Updates to ensure the clean up is always called at EXIT Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- v2: Use stuarts suggetion to clean up the interfaces on EXIT test/performance/odp_l2fwd_run | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)