From 3f946bfce72952bc9e775ec41278dd33afbc9eb1 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 20 Sep 2021 10:26:26 +0200 Subject: [PATCH] cov: capture runtime exception --- test/lib/brick-shelltest.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h index 8637d8a9f..0b1f9dfee 100644 --- a/test/lib/brick-shelltest.h +++ b/test/lib/brick-shelltest.h @@ -536,7 +536,11 @@ struct FileSource : Source { lseek( fd, 0, SEEK_END ); } if ( fd >= 0 ) - Source::sync( s ); + try { + Source::sync( s ); + } catch (...) { + perror("failed to sync"); + } } };