summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-09-20 10:26:26 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-09-20 14:26:09 +0200
commit3f946bfce72952bc9e775ec41278dd33afbc9eb1 (patch)
tree5dfae6c92a23c76ce37fe8a9f488398aa69b6eec /test/lib
parentd5c82b0e73421eb57bf36578b39813915af4676b (diff)
downloadlvm2-3f946bfce72952bc9e775ec41278dd33afbc9eb1.tar.gz
cov: capture runtime exception
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/brick-shelltest.h6
1 files changed, 5 insertions, 1 deletions
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");
+ }
}
};