lshal: add tests for ListCommand::fetch* and dumpVintf

Test: lshal_test
Change-Id: I9e519ec93709ba4dfa7f95e4c5fff60cbda36134
diff --git a/cmds/lshal/ListCommand.cpp b/cmds/lshal/ListCommand.cpp
index 99048af..4550e41 100644
--- a/cmds/lshal/ListCommand.cpp
+++ b/cmds/lshal/ListCommand.cpp
@@ -55,7 +55,7 @@
     return mLshal.err();
 }
 
-std::string getCmdline(pid_t pid) {
+std::string ListCommand::parseCmdline(pid_t pid) const {
     std::ifstream ifs("/proc/" + std::to_string(pid) + "/cmdline");
     std::string cmdline;
     if (!ifs.is_open()) {
@@ -70,7 +70,7 @@
     if (pair != mCmdlines.end()) {
         return pair->second;
     }
-    mCmdlines[pid] = ::android::lshal::getCmdline(pid);
+    mCmdlines[pid] = parseCmdline(pid);
     return mCmdlines[pid];
 }