diff options
| author | Matt Spinler <spinler@us.ibm.com> | 2017-03-10 09:05:30 -0600 |
|---|---|---|
| committer | Matt Spinler <spinler@us.ibm.com> | 2017-03-14 15:37:27 -0500 |
| commit | c3bffed7e47080667008e8272c64a2612e9bd73c (patch) | |
| tree | 0846a97dbf73ec3828416312a182d10b84600a8b /test | |
| parent | 12bdf058149dcab523f91c77aa734076a1afacaa (diff) | |
| download | openpower-proc-control-c3bffed7e47080667008e8272c64a2612e9bd73c.tar.gz openpower-proc-control-c3bffed7e47080667008e8272c64a2612e9bd73c.zip | |
Have the Target class manage the file descriptor
The sysfs file descriptor will now stay open from first
use until the Target class is destroyed.
Change-Id: Ib9803a527115cc75ecc9a5351d1e748ccd54a993
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/Makefile.am | 3 | ||||
| -rw-r--r-- | test/utest.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index bf86e6a..e0d20a2 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -13,4 +13,5 @@ utest_LDFLAGS = -lgtest_main -lgtest $(PTHREAD_LIBS) $(OESDK_TESTCASE_FLAGS) \ $(PHOSPHOR_LOGGING_LIBS) -lstdc++fs utest_SOURCES = utest.cpp -utest_LDADD = $(top_srcdir)/targeting.cpp $(top_srcdir)/registration.cpp +utest_LDADD = $(top_srcdir)/targeting.cpp $(top_srcdir)/registration.cpp \ + $(top_srcdir)/filedescriptor.cpp diff --git a/test/utest.cpp b/test/utest.cpp index 0d3c2c9..4572c55 100644 --- a/test/utest.cpp +++ b/test/utest.cpp @@ -62,7 +62,7 @@ TEST_F(TargetingTest, CreateTargets) auto t = targets.begin(); ASSERT_EQ((*t)->getPos(), 0); - ASSERT_EQ((*t)->getPath(), masterDir); + ASSERT_EQ((*t)->getCFAMPath(), masterDir); } @@ -95,7 +95,7 @@ TEST_F(TargetingTest, CreateTargets) path << _directory << "/slave@0" << i << ":00/raw"; } - ASSERT_EQ(t->getPath(), path.str()); + ASSERT_EQ(t->getCFAMPath(), path.str()); i++; } } |

