summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2021-09-20 10:26:05 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2021-09-20 14:26:09 +0200
commitd5c82b0e73421eb57bf36578b39813915af4676b (patch)
treed3e9b0327aa09630fc3364a5717c1cafd4a225be /test/lib
parentebd150366f0852e7ebd32e7743e6a135138320a0 (diff)
downloadlvm2-d5c82b0e73421eb57bf36578b39813915af4676b.tar.gz
cov: better defined constructors
Ensure C++ initializes all struct members. Also some deterministic buffer initialization.
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/brick-shelltest.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h
index b58f3d684..8637d8a9f 100644
--- a/test/lib/brick-shelltest.h
+++ b/test/lib/brick-shelltest.h
@@ -755,7 +755,7 @@ struct TestCase {
}
void pipe() {
- int fds[2];
+ int fds[2] = { 0 };
if (socketpair( PF_UNIX, SOCK_STREAM, 0, fds )) {
perror("socketpair");
@@ -981,7 +981,9 @@ struct TestCase {
}
TestCase( Journal &j, Options opt, std::string path, std::string _name, std::string _flavour )
- : child( path ), name( _name ), flavour( _flavour ), timeout( false ),
+ : child( path ), name( _name ), flavour( _flavour ),
+ iobuf( NULL ), usage( { 0 } ), status( 0 ), timeout( false ),
+ pid( 0 ), start( 0 ), end( 0 ), silent_start( 0 ),
last_update( 0 ), last_heartbeat( 0 ), options( opt ), journal( &j )
{
}
@@ -1085,7 +1087,7 @@ struct Main {
return journal.count( Journal::FAILED ) || journal.count( Journal::TIMEOUT ) ? 1 : 0;
}
- Main( Options o ) : die( false ), journal( o.outdir ), options( o ) {}
+ Main( Options o ) : die( false ), start( 0 ), journal( o.outdir ), options( o ) {}
};
namespace {