Lucas

I am using the samples/control.kbuild_and_tests test case and met a
problem. 

When I change the control file like this, 
---------------------------------------------------
diff --git a/client/samples/control.kbuild_and_tests
b/client/samples/control.kbuild_and_tests
index 59dd757..d842dc9 100644
--- a/client/samples/control.kbuild_and_tests
+++ b/client/samples/control.kbuild_and_tests
@@ -30,7 +30,8 @@ def step_init():
     # If you have a local/different kernel.org mirror, you can set it
     # by
     # uncommenting the below and set the URL properly.
     #job.config_set('local_mirror', 'http://foo/bar')
     -    testkernel = job.kernel('2.6.35')
     +#    testkernel = job.kernel('2.6.35')
     +    testkernel = job.kernel('../../linux-2.6/')
     # If you want to see kernel expansion in action,
     # comment the above and
     # uncomment the below. Keep in mind that after
     # some months, it's expected
     # that some of the patches might not
     # exist, so you might want to edit

So I inform the autotest to use a local copy of kernel source by giving
the relative path. Thie test will fail.

I look at the code and find the cause is autotest create a symbol link
at tmp/build which point to a wrong place.

ls tmp/build/ -l
total 4
lrwxrwxrwx 1 root root   15 2011-11-18 09:50 linux -> ../../linux-2.6
drwxr-xr-x 2 root root 4096 2011-11-18 09:50 src

It should be: 
ls tmp/build/ -l
total 4
lrwxrwxrwx 1 root root   15 2011-11-18 09:50 linux -> ../../../../linux-2.6
drwxr-xr-x 2 root root 4096 2011-11-18 09:50 src

I change the code like this.

diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index cb0ef99..3c8d7cd 100644
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -320,6 +320,7 @@ class kernel(BootableKernel):
             print 'Symlinking existing kernel source'
             if os.path.islink(self.build_dir):
                 os.remove(self.build_dir)
+            base_tree = os.path.abspath(base_tree)
             os.symlink(base_tree, self.build_dir)

         # otherwise, extract tarball

-- 
Richard Yang
Help you, Help me

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to