<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffcc" text="#000066">
<tt>I believe that when I first tried timing, it wasn't part of the
standard distribution. Then I ended using time instead.<br>
<br>
I checked the code and timing is not used anywhere. It would be ok to
remove now. If we need it in the future, we can add again.<br>
</tt>
<pre class="moz-signature" cols="72">Regards,
Marcos Eduardo Matsunaga
Oracle USA
Linux Engineering
“The statements and opinions expressed here are my own and do not
necessarily represent those of Oracle Corporation.”
</pre>
<br>
<br>
tristan.ye wrote:
<blockquote
cite="mid:1237860125.6737.11.camel@tristan-laptop.cn.oracle.com"
type="cite">
<pre wrap="">On Mon, 2009-03-23 at 23:55 +0800, Coly Li wrote:
</pre>
<blockquote type="cite">
<pre wrap="">In many python code, e.g. build_kernel.py, module timing is imported. No python
module named timing can be found from openSuSE 11.1 distribution, which will
cause an import error.
</pre>
</blockquote>
<pre wrap=""><!---->
Strange, what's the python version openSuSE 11.1 was shipping with? will
you check
1. python
2. import sys
3. str(sys.path)
to see if there is a timing.py existed in above path locations.
I personally think it would be not a grace way to get our central code
modified to fit a given distro, and it may be pretty easy to get such
a module from internet for your distros:-)
The reason why I want to keep the timing module in ocfs2-test is that
such module provides a more accurate way to evaluate the time a process
executed during the test, it even reaches a microsends level.
Anyway, Marcos is the original author, he may have some reasons to place
a timing module here.
</pre>
<blockquote type="cite">
<pre wrap="">I don't find anywhere uses timing module, therefore this unused module can be
removed from source code. I also find some places import time module twice, this
patch removes redundant module importing as well.
Signed-off-by: Coly Li <a class="moz-txt-link-rfc2396E" href="mailto:coly.li@suse.de"><coly.li@suse.de></a>
---
programs/atime_quantum/test_atime_quantum.py | 2 +-
programs/buildkernel/buildkernel.py | 2 +-
programs/create_files/crfiles.py | 2 +-
programs/cross_delete/crdel_del_files.py | 2 +-
programs/cross_delete/crdel_gen_files.py | 2 +-
programs/cross_delete/cross_delete.py | 2 +-
programs/open_delete/open_delete.py | 2 +-
programs/recovery_load/recovery_load.py | 2 +-
programs/splice/splice_test.h | 5 ++++-
programs/splice/splice_test.py | 2 +-
programs/write_torture/write_torture.py | 2 +-
11 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/programs/atime_quantum/test_atime_quantum.py
b/programs/atime_quantum/test_atime_quantum.py
index 21d07f1..076c8a8 100755
--- a/programs/atime_quantum/test_atime_quantum.py
+++ b/programs/atime_quantum/test_atime_quantum.py
@@ -25,7 +25,7 @@
# Author        : Marcos E. Matsunaga
#
-import os, stat, sys, time, optparse, socket, string, o2tf, pdb, timing, config
+import os, stat, sys, time, optparse, socket, string, o2tf, pdb, config
import random, os.path
#
# FUNCTIONS START
diff --git a/programs/buildkernel/buildkernel.py
b/programs/buildkernel/buildkernel.py
index d06dcc1..7c6c10b 100755
--- a/programs/buildkernel/buildkernel.py
+++ b/programs/buildkernel/buildkernel.py
@@ -29,7 +29,7 @@
# E-mail                 : <a class="moz-txt-link-abbreviated" href="mailto:Marcos.Matsunaga@oracle.com">Marcos.Matsunaga@oracle.com</a>
#
-import os, sys, time, optparse, socket, string, o2tf, pdb, timing, time, config
+import os, sys, time, optparse, socket, string, o2tf, pdb, config
#
DEBUGON = os.getenv('DEBUG',0)
#
diff --git a/programs/create_files/crfiles.py b/programs/create_files/crfiles.py
index dc78296..130fb18 100755
--- a/programs/create_files/crfiles.py
+++ b/programs/create_files/crfiles.py
@@ -30,7 +30,7 @@
# E-mail : <a class="moz-txt-link-abbreviated" href="mailto:Marcos.Matsunaga@oracle.com">Marcos.Matsunaga@oracle.com</a>
#
-import os, sys, time, optparse, socket, string, o2tf, pdb, timing, time, config
+import os, sys, time, optparse, socket, string, o2tf, pdb, config
#
DEBUGON = os.getenv('DEBUG',0)
#
diff --git a/programs/cross_delete/crdel_del_files.py
b/programs/cross_delete/crdel_del_files.py
index a7de8d4..d15c185 100755
--- a/programs/cross_delete/crdel_del_files.py
+++ b/programs/cross_delete/crdel_del_files.py
@@ -26,7 +26,7 @@
# E-mail                 : <a class="moz-txt-link-abbreviated" href="mailto:Marcos.Matsunaga@oracle.com">Marcos.Matsunaga@oracle.com</a>
#
-import os, stat, sys, time, optparse, socket, string, o2tf, pdb, timing, config
+import os, stat, sys, time, optparse, socket, string, o2tf, pdb, config
#
#pdb.set_trace()
#
diff --git a/programs/cross_delete/crdel_gen_files.py
b/programs/cross_delete/crdel_gen_files.py
index f076f43..d218614 100755
--- a/programs/cross_delete/crdel_gen_files.py
+++ b/programs/cross_delete/crdel_gen_files.py
@@ -29,7 +29,7 @@
# E-mail                 : <a class="moz-txt-link-abbreviated" href="mailto:Marcos.Matsunaga@oracle.com">Marcos.Matsunaga@oracle.com</a>
#
-import os, stat, sys, time, optparse, socket, string, o2tf, pdb, timing, time
+import os, stat, sys, time, optparse, socket, string, o2tf, pdb
import config
#
#pdb.set_trace()
diff --git a/programs/cross_delete/cross_delete.py
b/programs/cross_delete/cross_delete.py
index 483bbe5..12b6b94 100755
--- a/programs/cross_delete/cross_delete.py
+++ b/programs/cross_delete/cross_delete.py
@@ -29,7 +29,7 @@
# E-mail                 : <a class="moz-txt-link-abbreviated" href="mailto:Marcos.Matsunaga@oracle.com">Marcos.Matsunaga@oracle.com</a>
#
-import os, sys, time, optparse, socket, string, o2tf, config, pdb, timing
+import os, sys, time, optparse, socket, string, o2tf, config, pdb
import time, config
#
MAXDIRLEVEL = 64
diff --git a/programs/open_delete/open_delete.py
b/programs/open_delete/open_delete.py
index 5772643..8fcb97d 100755
--- a/programs/open_delete/open_delete.py
+++ b/programs/open_delete/open_delete.py
@@ -27,7 +27,7 @@
# Author        :        Marcos E. Matsunaga
#
-import os, stat, sys, time, optparse, socket, string, o2tf, pdb, timing, config
+import os, stat, sys, time, optparse, socket, string, o2tf, pdb, config
#
#pdb.set_trace()
#
diff --git a/programs/recovery_load/recovery_load.py
b/programs/recovery_load/recovery_load.py
index 7b42717..c1b1327 100644
--- a/programs/recovery_load/recovery_load.py
+++ b/programs/recovery_load/recovery_load.py
@@ -29,7 +29,7 @@
# Author        : Marcos E. Matsunaga
#
#
-import os, sys, time, optparse, socket, string, o2tf, config, pdb, timing
+import os, sys, time, optparse, socket, string, o2tf, config, pdb
import time, config
#
MAXDIRLEVEL = 64
diff --git a/programs/splice/splice_test.h b/programs/splice/splice_test.h
index 5113bbb..9a223d3 100644
--- a/programs/splice/splice_test.h
+++ b/programs/splice/splice_test.h
@@ -31,9 +31,12 @@
#error unsupported arch
#endif
-int splice(int fdin, loff_t *off_in, int fdout,
+int test_splice(int fdin, loff_t *off_in, int fdout,
                         loff_t *off_out, size_t len, unsigned int flags)
{
        return syscall(__NR_splice, fdin, off_in, fdout, off_out, len, flags);
}
+#ifndef USE_LIBC_SPLICE
+#define splice test_splice
+#endif
diff --git a/programs/splice/splice_test.py b/programs/splice/splice_test.py
index a5dca4c..eecfdbd 100644
--- a/programs/splice/splice_test.py
+++ b/programs/splice/splice_test.py
@@ -24,7 +24,7 @@
# Author        : Marcos E. Matsunaga
#
-import os, sys, time, optparse, socket, string, o2tf, config, pdb, timing
+import os, sys, time, optparse, socket, string, o2tf, config, pdb
import time, config, os.path
#
MD5SUM = '/usr/bin/md5sum'
diff --git a/programs/write_torture/write_torture.py
b/programs/write_torture/write_torture.py
index ef8cf74..288daeb 100755
--- a/programs/write_torture/write_torture.py
+++ b/programs/write_torture/write_torture.py
@@ -28,7 +28,7 @@
# Author                 : Marcos E. Matsunaga
#
-import os, stat, sys, time, optparse, socket, string, o2tf, pdb, timing, config
+import os, stat, sys, time, optparse, socket, string, o2tf, pdb, config
import random
#
#pdb.set_trace()
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
Ocfs2-test-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Ocfs2-test-devel@oss.oracle.com">Ocfs2-test-devel@oss.oracle.com</a>
<a class="moz-txt-link-freetext" href="http://oss.oracle.com/mailman/listinfo/ocfs2-test-devel">http://oss.oracle.com/mailman/listinfo/ocfs2-test-devel</a>
</pre>
</blockquote>
</body>
</html>