From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [PATCH lttng-tools 2/9] Fix: tests: error handling in high throughput limits test Date: Wed, 15 May 2019 18:36:29 -0400 (EDT) Message-ID: <934576049.1892.1557959789884.JavaMail.zimbra__40413.3950521768$1557959809$gmane$org@efficios.com> References: <20190503135547.12968-1-mathieu.desnoyers@efficios.com> <20190503135547.12968-3-mathieu.desnoyers@efficios.com> <20190515163127.GD14986@joraj-alpa> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.efficios.com (mail.efficios.com [167.114.142.138]) by lists.lttng.org (Postfix) with ESMTPS id 4548YC5n6RzyxM for ; Wed, 15 May 2019 18:36:31 -0400 (EDT) In-Reply-To: <20190515163127.GD14986@joraj-alpa> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" To: Jonathan Rajotte Cc: lttng-dev , Jeremie Galarneau , Jonathan Rajotte-Julien List-Id: lttng-dev@lists.lttng.org ----- On May 15, 2019, at 12:31 PM, Jonathan Rajotte jonathan.rajotte-julien@efficios.com wrote: >> @@ -168,8 +187,7 @@ skip $isroot "Root access is needed to set bandwith limits. >> Skipping all tests." >> { >> >> # Catch sigint and try to cleanup limits >> - trap interrupt_cleanup SIGTERM >> - trap interrupt_cleanup SIGINT >> + trap interrupt_cleanup SIGTERM SIGINT >> >> BW_LIMITS=(3200 1600 800 400 200 100 50 25) >> for BW in ${BW_LIMITS[@]}; >> @@ -177,6 +195,7 @@ skip $isroot "Root access is needed to set bandwith limits. >> Skipping all tests." >> diag "Test high-throughput with bandwidth limit set to ${BW}kbits" >> >> set_bw_limit $BW >> + ok $? "Setting bandwidth limit" > > In case of failure here we should force a reset since it could lead to long > timeout/hang depending on which tc command failed? > > This could also be done inside set_bw_limit at each stage. I'll do this. Will be in v2 of this patch. Thanks, Mathieu > >> >> start_lttng_sessiond >> start_lttng_relayd "-o $TRACE_PATH" >> @@ -185,5 +204,6 @@ skip $isroot "Root access is needed to set bandwith limits. >> Skipping all tests." >> stop_lttng_relayd >> stop_lttng_sessiond >> reset_bw_limit >> + ok $? "Reset bandwith limits" >> done >> } >> -- >> 2.11.0 >> > > -- > Jonathan Rajotte-Julien > EfficiOS -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com