Currently, the linus_stress try to copy the source code file
to bindir/src, while it will make the tests dir "none read only".
To copy the file to srcdir to make it work correctly.

Signed-off-by: Mike Qiu <[email protected]>
---
 client/tests/linus_stress/linus_stress.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/client/tests/linus_stress/linus_stress.py 
b/client/tests/linus_stress/linus_stress.py
index e51dcde..c256bb7 100644
--- a/client/tests/linus_stress/linus_stress.py
+++ b/client/tests/linus_stress/linus_stress.py
@@ -6,9 +6,8 @@ class linus_stress(test.test):
     version = 1
 
     def setup(self):
-        os.mkdir(self.srcdir)
-        os.chdir(self.bindir)
-        utils.system('cp linus_stress.c src/')
+        shutil.copyfile(os.path.join(self.bindir, 'linus_stress.c'),
+                        os.path.join(self.srcdir,'linus_stress.c'))
         os.chdir(self.srcdir)
         utils.system(utils.get_cc() + ' linus_stress.c 
-D_POSIX_C_SOURCE=200112 -o linus_stress')
 
-- 
1.7.7.6

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to