Snap for 4402249 from 8e83218ec3beaaf630d812fb1dda90b5190a80d5 to oc-mr1-release

Change-Id: I2e0bfc2909d485649dca82291c13de6a0865ea27
diff --git a/ltp/KernelLtpTest.py b/ltp/KernelLtpTest.py
index 3146ab5..ccf8880 100644
--- a/ltp/KernelLtpTest.py
+++ b/ltp/KernelLtpTest.py
@@ -400,8 +400,9 @@
                                                      (True, test_case.note))
                 continue
 
-            cmd = "export {envp} && {commands}".format(
-                envp=self.GetEnvp(), commands=test_case.GetCommand())
+            cmd = "export {envp} && cd {cwd} && {commands}".format(
+                envp=self.GetEnvp(), cwd=ltp_configs.LTPBINPATH,
+                commands=test_case.command)
 
             logging.info("Worker {} starts executing command "
                          "for '{}'.\n  Command:{}".format(id, test_case, cmd))
@@ -454,8 +455,9 @@
         asserts.skipIf(test_case.is_filtered, test_case.note)
         asserts.skipIf(not self._requirement.Check(test_case), test_case.note)
 
-        cmd = "export {envp} && {commands}".format(
-            envp=self.GetEnvp(), commands=test_case.GetCommand())
+        cmd = "export {envp} && cd {cwd} && {commands}".format(
+            envp=self.GetEnvp(), cwd=ltp_configs.LTPBINPATH,
+            commands=test_case.command)
         logging.info("Executing %s", cmd)
         self.CheckResult(self.shell.Execute(cmd))
 
diff --git a/ltp/configs/stable_tests.py b/ltp/configs/stable_tests.py
index c33da36..fc918f4 100644
--- a/ltp/configs/stable_tests.py
+++ b/ltp/configs/stable_tests.py
@@ -193,7 +193,6 @@
     'mm.page02_64bit',
     'mm.stack_space_32bit',
     'mm.stack_space_64bit',
-    'mm.thp01_32bit',
     'mm.vma01_32bit',
     'nptl.nptl01_32bit',
     'nptl.nptl01_64bit',
@@ -230,12 +229,8 @@
     'syscalls.accept01_64bit',
     'syscalls.access01_32bit',
     'syscalls.access01_64bit',
-    'syscalls.access02_32bit',
-    'syscalls.access02_64bit',
     'syscalls.access03_32bit',
     'syscalls.access03_64bit',
-    'syscalls.access04_32bit',
-    'syscalls.access04_64bit',
     'syscalls.access05_32bit',
     'syscalls.access05_64bit',
     'syscalls.add_key01_32bit',
@@ -662,8 +657,6 @@
     'syscalls.futimesat01_64bit',
     'syscalls.get_robust_list01_32bit',
     'syscalls.get_robust_list01_64bit',
-    'syscalls.getcwd01_32bit',
-    'syscalls.getcwd01_64bit',
     'syscalls.getcwd04_32bit',
     'syscalls.getcwd04_64bit',
     'syscalls.getdents01_32bit',
@@ -1086,10 +1079,6 @@
     'syscalls.preadv01_64bit',
     'syscalls.preadv02_64_32bit',
     'syscalls.preadv02_64_64bit',
-    'syscalls.pselect01_32bit',
-    'syscalls.pselect01_64_32bit',
-    'syscalls.pselect01_64_64bit',
-    'syscalls.pselect01_64bit',
     'syscalls.pselect02_32bit',
     'syscalls.pselect02_64_32bit',
     'syscalls.pselect02_64_64bit',
diff --git a/ltp/test_case.py b/ltp/test_case.py
index 6862a3c..85a9a94 100644
--- a/ltp/test_case.py
+++ b/ltp/test_case.py
@@ -92,28 +92,10 @@
         """Set the test case's name."""
         self._testname = testname
 
-    def InternalAddLtpPathToCommand(self, command):
-        """Internal function to change binary in commands to their full path"""
-        tokens = command.strip().split()
-
-        # If not ltp executables:
-        if (tokens[0] in ltp_configs.INTERNAL_BINS or
-                tokens[0] in ltp_configs.INTERNAL_SHELL_COMMANDS or
-                tokens[0].find('=') > 0):
-            return command
-        else:  # Is Ltp executable
-            tokens[0] = path_utils.JoinTargetPath(ltp_configs.LTPBINPATH,
-                                                  tokens[0])
-            return ' '.join(tokens)
-
-    def GetCommand(self):
-        """Get test case's command.
-
-        Get the test case's command where ltp test binary names have been
-        replaced with their full paths
-        """
-        return '&&'.join((self.InternalAddLtpPathToCommand(command)
-                          for command in self._command.split('&&')))
+    @property
+    def command(self):
+        """Get the test case's command."""
+        return self._command
 
     def InternalGetExecutableNames(self):
         """Get a generator of all required executable file names"""