[gparted] Test that PipeCapture clears capture buffer before it starts (#777973)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Test that PipeCapture clears capture buffer before it starts (#777973)
- Date: Sat, 3 Jun 2017 15:42:47 +0000 (UTC)
commit 03c2be9b90e996efaab9663a1e6aa0c7df30be42
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Thu May 25 07:08:14 2017 +0100
Test that PipeCapture clears capture buffer before it starts (#777973)
Initialise capture string with sacrificial text before each test.
Existing tests confirm this is cleared first by checking the captured
string matches the input string.
Bug 777973 - Segmentation fault on bad disk
tests/test_PipeCapture.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_PipeCapture.cc b/tests/test_PipeCapture.cc
index ddced6c..332b38d 100644
--- a/tests/test_PipeCapture.cc
+++ b/tests/test_PipeCapture.cc
@@ -142,7 +142,8 @@ std::string BinaryStringToPrint( size_t offset, const char * s, size_t len )
class PipeCaptureTest : public ::testing::Test
{
protected:
- PipeCaptureTest() : eof_signalled( false ), update_signalled( 0U ) {};
+ PipeCaptureTest() : capturedstr( "text to be replaced" ),
+ eof_signalled( false ), update_signalled( 0U ) {};
virtual void SetUp();
virtual void TearDown();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]