All of lore.kernel.org
 help / color / mirror / Atom feed
* Incorrect tar command used in 'virt_test_utils.py'
@ 2011-07-08  8:46 Lukas Doktor
  2011-07-08  8:46 ` [PATCH] * 'tar' needs relative paths to strip the leading '/' Lukas Doktor
  2011-07-08 18:06 ` Incorrect tar command used in 'virt_test_utils.py' Lucas Meneghel Rodrigues
  0 siblings, 2 replies; 3+ messages in thread
From: Lukas Doktor @ 2011-07-08  8:46 UTC (permalink / raw)
  To: autotest, kvm, kvm-autotest, fyang, lmr, ldoktor, jzupka


Hi,

the tar command must use relative path to strip the leading '/' directories. Without this patch the kvm autotest's autotest test extracts autotest on guest into the original location of the autotest on the host. The location might not correspond with the test location and the test might fail.

Regards,
Lukáš
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] * 'tar' needs relative paths to strip the leading '/'
  2011-07-08  8:46 Incorrect tar command used in 'virt_test_utils.py' Lukas Doktor
@ 2011-07-08  8:46 ` Lukas Doktor
  2011-07-08 18:06 ` Incorrect tar command used in 'virt_test_utils.py' Lucas Meneghel Rodrigues
  1 sibling, 0 replies; 3+ messages in thread
From: Lukas Doktor @ 2011-07-08  8:46 UTC (permalink / raw)
  To: autotest, kvm, kvm-autotest, fyang, lmr, ldoktor, jzupka

Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
---
 client/virt/virt_test_utils.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/virt/virt_test_utils.py b/client/virt/virt_test_utils.py
index 2636352..1ef4f69 100644
--- a/client/virt/virt_test_utils.py
+++ b/client/virt/virt_test_utils.py
@@ -524,11 +524,11 @@ def run_autotest(vm, session, control_path, timeout, outputdir, params):
         mig_timeout = float(params.get("mig_timeout", "3600"))
         mig_protocol = params.get("migration_protocol", "tcp")
 
-    compressed_autotest_path = "/tmp/autotest.tar.bz2"
+    compressed_autotest_path = os.path.relpath("/tmp/autotest.tar.bz2")
 
     # To avoid problems, let's make the test use the current AUTODIR
     # (autotest client path) location
-    autotest_path = os.environ['AUTODIR']
+    autotest_path = os.path.relpath(os.environ['AUTODIR'])
 
     # tar the contents of bindir/autotest
     cmd = "tar cvjf %s %s/*" % (compressed_autotest_path, autotest_path)
-- 
1.7.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Incorrect tar command used in 'virt_test_utils.py'
  2011-07-08  8:46 Incorrect tar command used in 'virt_test_utils.py' Lukas Doktor
  2011-07-08  8:46 ` [PATCH] * 'tar' needs relative paths to strip the leading '/' Lukas Doktor
@ 2011-07-08 18:06 ` Lucas Meneghel Rodrigues
  1 sibling, 0 replies; 3+ messages in thread
From: Lucas Meneghel Rodrigues @ 2011-07-08 18:06 UTC (permalink / raw)
  To: Lukas Doktor; +Cc: autotest, kvm-autotest, kvm

On Fri, 2011-07-08 at 10:46 +0200, Lukas Doktor wrote:
> the tar command must use relative path to strip the leading '/'
> directories. Without this patch the kvm autotest's autotest test
> extracts autotest on guest into the original location of the autotest
> on the host. The location might not correspond with the test location
> and the test might fail.

Ok, thanks for fixing this, applied:

http://autotest.kernel.org/changeset/5494

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-08 18:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08  8:46 Incorrect tar command used in 'virt_test_utils.py' Lukas Doktor
2011-07-08  8:46 ` [PATCH] * 'tar' needs relative paths to strip the leading '/' Lukas Doktor
2011-07-08 18:06 ` Incorrect tar command used in 'virt_test_utils.py' Lucas Meneghel Rodrigues

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.