From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 070A75A026B; Mon, 13 Feb 2023 02:12:12 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] test/pasta_options: Ignore failures on shell 'exit' Date: Mon, 13 Feb 2023 02:12:12 +0100 Message-Id: <20230213011212.1198757-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: VFWN6ZEZMWSZ65WAV33ZA4AZXHAM6DQN X-Message-ID-Hash: VFWN6ZEZMWSZ65WAV33ZA4AZXHAM6DQN X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Paul Holzinger X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On shell 'exit' commands, running shells from pasta, we might get: Cannot set tty process group (No such process) as some TTY devices might be unaccessible. This is harmless, but after commit "pasta: propagate exit code from child command", we'll get test failures there, at least with dash. Ignore those explicitly with a ugly workaround: we can't simply do something like: exit || : because the failure is reported by the shell itself once it exits, regardless of the command evaluation. Signed-off-by: Stefano Brivio --- This is already applied, I needed to unblock tests. Posting anyway for reviews. test/pasta_options/log_to_file | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/pasta_options/log_to_file b/test/pasta_options/log_to_file index 587bf8e..29fb2c8 100644 --- a/test/pasta_options/log_to_file +++ b/test/pasta_options/log_to_file @@ -34,12 +34,14 @@ set PORTS -t 10001,10002 -u 10001,10002 set LOG_FILE __STATEDIR__/pasta.log passt ./pasta -l __LOG_FILE__ -passt exit +passtb exit +sleep 1 check [ -s __LOG_FILE__ ] test Log truncated on creation passt ./pasta -l __LOG_FILE__ -passt exit +passtb exit +sleep 1 check [ $(cat __LOG_FILE__ | wc -l) -eq 1 ] test Maximum log size @@ -85,6 +87,7 @@ check_log_size_mountns test Timestamp consistency after rotations (no FALLOC_FL_COLLAPSE_RANGE) check tail -n +2 __LOG_FILE__ | cut -f1 -d' ' | tr -d [.:] | sort -c -passt exit +passtb exit +sleep 1 passt umount __STATEDIR__/t passt exit -- 2.35.1