* [PATCH 1/3] Make possible to use kvm_config as a standalone program.
@ 2009-06-08 4:04 Lucas Meneghel Rodrigues
2009-06-08 4:04 ` [PATCH 2/3] Fixing bad line breaks Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:04 UTC (permalink / raw)
To: autotest; +Cc: kvm, Lucas Meneghel Rodrigues
Replace autotest exceptions for standard python exceptions. This
will allow kvm_config.py to be used as a stand alone program.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_config.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py
index 8b6ab15..dda421b 100755
--- a/client/tests/kvm/kvm_config.py
+++ b/client/tests/kvm/kvm_config.py
@@ -1,5 +1,4 @@
import re, os, sys, StringIO
-from autotest_lib.client.common_lib import error
"""
KVM configuration file utility functions.
@@ -356,7 +355,7 @@ class config:
# (inside an exception or inside subvariants)
if restricted:
e_msg = "Using variants in this context is not allowed"
- raise error.AutotestError()
+ raise ValueError(e_msg)
if self.debug and not restricted:
self.__debug_print(indented_line,
"Entering variants block (%d dicts in"
@@ -401,7 +400,7 @@ class config:
words[1])
if not os.path.exists(filename):
e_msg = "Cannot include %s -- file not found" % filename
- raise error.AutotestError(e_msg)
+ raise IOError(e_msg)
new_file = open(filename, "r")
list = self.parse(new_file, list, restricted)
new_file.close()
@@ -409,7 +408,7 @@ class config:
self.__debug_print("", "Leaving file %s" % words[1])
else:
e_msg = "Cannot include anything because no file is open"
- raise error.AutotestError(e_msg)
+ raise ValueError(e_msg)
# Parse multi-line exceptions
# (the block is parsed for each dict separately)
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/3] Fixing bad line breaks
2009-06-08 4:04 [PATCH 1/3] Make possible to use kvm_config as a standalone program Lucas Meneghel Rodrigues
@ 2009-06-08 4:04 ` Lucas Meneghel Rodrigues
2009-06-08 4:04 ` [PATCH 3/3] Fix bad logging calls Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:04 UTC (permalink / raw)
To: autotest; +Cc: kvm, Lucas Meneghel Rodrigues
During the conversion of logging statements, some bad line
continuation were introduced. This patch fixes the mistakes.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_tests.py | 12 ++++++------
client/tests/kvm/make_html_report.py | 5 ++---
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py
index cccc48e..9adea6f 100644
--- a/client/tests/kvm/kvm_tests.py
+++ b/client/tests/kvm/kvm_tests.py
@@ -274,8 +274,8 @@ def run_autotest(test, params, env):
copy = True
# Perform the copy
if copy:
- logging.info("Copying %s.tar.bz2 to guest (file is missing or has a"
- " different size)..." % test_name)
+ logging.info("Copying %s.tar.bz2 to guest \
+ (file is missing or has a different size)..." % test_name)
if not vm.scp_to_remote(tarred_test_path, ""):
raise error.TestFail("Could not copy %s.tar.bz2 to guest" %
test_name)
@@ -291,8 +291,8 @@ def run_autotest(test, params, env):
# Extract <test_name>.tar.bz2 into autotest/tests
logging.info("Extracting %s.tar.bz2..." % test_name)
- status = session.get_command_status("tar xvfj %s.tar.bz2 -C "
- "autotest/tests" % test_name)
+ status = session.get_command_status("tar xvfj %s.tar.bz2 -C \
+ autotest/tests" % test_name)
if status != 0:
raise error.TestFail("Could not extract %s.tar.bz2" % test_name)
@@ -321,8 +321,8 @@ def run_autotest(test, params, env):
status_fail = False
if result_list == []:
status_fail = True
- message_fail = "Test '%s' did not produce any recognizable"
- " results" % test_name
+ message_fail = "Test '%s' did not produce any recognizable \
+ results" % test_name
for result in result_list:
logging.info(str(result))
if result[1] == "FAIL":
diff --git a/client/tests/kvm/make_html_report.py b/client/tests/kvm/make_html_report.py
index 6aed39e..5b2e579 100755
--- a/client/tests/kvm/make_html_report.py
+++ b/client/tests/kvm/make_html_report.py
@@ -1442,9 +1442,8 @@ return true;
stat_str = 'No test cases executed'
if total_executed>0:
failed_perct = int(float(total_failed)/float(total_executed)*100)
- stat_str = 'From %d tests executed, '
- '%d have passed (%d%s)' % (total_executed, total_passed,failed_perct,
- '% failures')
+ stat_str = 'From %d tests executed, %d have passed (%d%% failures)' % \
+ (total_executed, total_passed, failed_perct)
kvm_ver_str = metadata['kvmver']
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] Fix bad logging calls
2009-06-08 4:04 ` [PATCH 2/3] Fixing bad line breaks Lucas Meneghel Rodrigues
@ 2009-06-08 4:04 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:04 UTC (permalink / raw)
To: autotest; +Cc: kvm, Lucas Meneghel Rodrigues
During the conversion of kvm autotest to upstream coding standards,
some bad logging calls were left behind. This patch fixes them.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_utils.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index 434190d..37a1f22 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -304,7 +304,7 @@ class kvm_spawn:
# Print some debugging info
if match == None and self.poll() != 0:
- logging.debug("Timeout elapsed or process terminated. Output:",
+ logging.debug("Timeout elapsed or process terminated. Output: %s",
format_str_for_message(data.strip()))
return (match, data)
@@ -465,8 +465,8 @@ class kvm_spawn:
# Print some debugging info
if status != 0:
- logging.debug("Command failed; status: %d, output:" % status \
- + format_str_for_message(output.strip()))
+ logging.debug("Command failed; status: %d, output: %s", status,
+ format_str_for_message(output.strip()))
return (status, output)
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [KVM-AUTOTEST PATCH 0/8] Re-submitting some of the patches on the patch queue
@ 2009-06-08 4:01 Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [KVM-AUTOTEST PATCH 1/8] kvm_config: Allow for "=" in the value of a config parameter Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:01 UTC (permalink / raw)
To: kvm; +Cc: Lucas Meneghel Rodrigues
I have rebased some of the patches on the patch queue I sent earlier to the
list. I am sending them to your appreciation, the other will follow.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [KVM-AUTOTEST PATCH 1/8] kvm_config: Allow for "=" in the value of a config parameter
2009-06-08 4:01 [KVM-AUTOTEST PATCH 0/8] Re-submitting some of the patches on the patch queue Lucas Meneghel Rodrigues
@ 2009-06-08 4:01 ` Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [PATCH 1/3] Make possible to use kvm_config as a standalone program Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:01 UTC (permalink / raw)
To: kvm; +Cc: Lucas Meneghel Rodrigues, David Huff
fix modifies kvm_config.split_and_strip so it will only split once per
line.
example: kernel_args = "ks=floppy console=ttyS0 noacpi"
Signed-off-by: David Huff <dhuff@redhat.com>
---
client/tests/kvm/kvm_config.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py
index 8b6ab15..40f16f1 100755
--- a/client/tests/kvm/kvm_config.py
+++ b/client/tests/kvm/kvm_config.py
@@ -136,7 +136,7 @@ class config:
@param str: String that will be processed
@param sep: Separator that will be used to split the string
"""
- temp = str.split(sep)
+ temp = str.split(sep, 1)
for i in range(len(temp)):
temp[i] = temp[i].strip()
temp[i] = temp[i].strip("\"\'")
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 1/3] Make possible to use kvm_config as a standalone program.
2009-06-08 4:01 ` [KVM-AUTOTEST PATCH 1/8] kvm_config: Allow for "=" in the value of a config parameter Lucas Meneghel Rodrigues
@ 2009-06-08 4:01 ` Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [PATCH 2/3] Fixing bad line breaks Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:01 UTC (permalink / raw)
To: kvm; +Cc: Lucas Meneghel Rodrigues
Replace autotest exceptions for standard python exceptions. This
will allow kvm_config.py to be used as a stand alone program.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_config.py | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py
index 8b6ab15..dda421b 100755
--- a/client/tests/kvm/kvm_config.py
+++ b/client/tests/kvm/kvm_config.py
@@ -1,5 +1,4 @@
import re, os, sys, StringIO
-from autotest_lib.client.common_lib import error
"""
KVM configuration file utility functions.
@@ -356,7 +355,7 @@ class config:
# (inside an exception or inside subvariants)
if restricted:
e_msg = "Using variants in this context is not allowed"
- raise error.AutotestError()
+ raise ValueError(e_msg)
if self.debug and not restricted:
self.__debug_print(indented_line,
"Entering variants block (%d dicts in"
@@ -401,7 +400,7 @@ class config:
words[1])
if not os.path.exists(filename):
e_msg = "Cannot include %s -- file not found" % filename
- raise error.AutotestError(e_msg)
+ raise IOError(e_msg)
new_file = open(filename, "r")
list = self.parse(new_file, list, restricted)
new_file.close()
@@ -409,7 +408,7 @@ class config:
self.__debug_print("", "Leaving file %s" % words[1])
else:
e_msg = "Cannot include anything because no file is open"
- raise error.AutotestError(e_msg)
+ raise ValueError(e_msg)
# Parse multi-line exceptions
# (the block is parsed for each dict separately)
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/3] Fixing bad line breaks
2009-06-08 4:01 ` [PATCH 1/3] Make possible to use kvm_config as a standalone program Lucas Meneghel Rodrigues
@ 2009-06-08 4:01 ` Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [KVM-AUTOTEST PATCH 2/8] RHEL-4.7 step files: fix the initial boot barriers Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:01 UTC (permalink / raw)
To: kvm; +Cc: Lucas Meneghel Rodrigues
During the conversion of logging statements, some bad line
continuation were introduced. This patch fixes the mistakes.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_tests.py | 12 ++++++------
client/tests/kvm/make_html_report.py | 5 ++---
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py
index cccc48e..9adea6f 100644
--- a/client/tests/kvm/kvm_tests.py
+++ b/client/tests/kvm/kvm_tests.py
@@ -274,8 +274,8 @@ def run_autotest(test, params, env):
copy = True
# Perform the copy
if copy:
- logging.info("Copying %s.tar.bz2 to guest (file is missing or has a"
- " different size)..." % test_name)
+ logging.info("Copying %s.tar.bz2 to guest \
+ (file is missing or has a different size)..." % test_name)
if not vm.scp_to_remote(tarred_test_path, ""):
raise error.TestFail("Could not copy %s.tar.bz2 to guest" %
test_name)
@@ -291,8 +291,8 @@ def run_autotest(test, params, env):
# Extract <test_name>.tar.bz2 into autotest/tests
logging.info("Extracting %s.tar.bz2..." % test_name)
- status = session.get_command_status("tar xvfj %s.tar.bz2 -C "
- "autotest/tests" % test_name)
+ status = session.get_command_status("tar xvfj %s.tar.bz2 -C \
+ autotest/tests" % test_name)
if status != 0:
raise error.TestFail("Could not extract %s.tar.bz2" % test_name)
@@ -321,8 +321,8 @@ def run_autotest(test, params, env):
status_fail = False
if result_list == []:
status_fail = True
- message_fail = "Test '%s' did not produce any recognizable"
- " results" % test_name
+ message_fail = "Test '%s' did not produce any recognizable \
+ results" % test_name
for result in result_list:
logging.info(str(result))
if result[1] == "FAIL":
diff --git a/client/tests/kvm/make_html_report.py b/client/tests/kvm/make_html_report.py
index 6aed39e..5b2e579 100755
--- a/client/tests/kvm/make_html_report.py
+++ b/client/tests/kvm/make_html_report.py
@@ -1442,9 +1442,8 @@ return true;
stat_str = 'No test cases executed'
if total_executed>0:
failed_perct = int(float(total_failed)/float(total_executed)*100)
- stat_str = 'From %d tests executed, '
- '%d have passed (%d%s)' % (total_executed, total_passed,failed_perct,
- '% failures')
+ stat_str = 'From %d tests executed, %d have passed (%d%% failures)' % \
+ (total_executed, total_passed, failed_perct)
kvm_ver_str = metadata['kvmver']
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* [KVM-AUTOTEST PATCH 2/8] RHEL-4.7 step files: fix the initial boot barriers
2009-06-08 4:01 ` [PATCH 2/3] Fixing bad line breaks Lucas Meneghel Rodrigues
@ 2009-06-08 4:01 ` Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [PATCH 3/3] Fix bad logging calls Lucas Meneghel Rodrigues
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:01 UTC (permalink / raw)
To: kvm; +Cc: Lucas Meneghel Rodrigues, Michael Goldish
Fix the first barrier to include the 'boot:' prompt. This is crucial
because the guest accepts keyboard input only after this prompt
appears.
Visibility: Small (Data file on the kvm test)
Risk: Low (Small, tested change to a data file)
Signed-off-by: Michael Goldish <mgoldish@redhat.com>
---
client/tests/kvm/steps/RHEL-4.7-i386.steps | 2 +-
client/tests/kvm/steps/RHEL-4.7-x86_64.steps | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/tests/kvm/steps/RHEL-4.7-i386.steps b/client/tests/kvm/steps/RHEL-4.7-i386.steps
index 3816c15..763d473 100644
--- a/client/tests/kvm/steps/RHEL-4.7-i386.steps
+++ b/client/tests/kvm/steps/RHEL-4.7-i386.steps
@@ -4,7 +4,7 @@
# --------------------------------
step unknown
screendump 20090413_013526_868fe81019ae64a0b066c4c0d4ebc4e1.ppm
-barrier_2 188 30 354 265 48ef114b5a42ba0d5bebfaee47dce498 50
+barrier_2 44 38 0 363 d9ca61811a10b33cc95515d4796541e7 50
# Sending keys: ret
key ret
# --------------------------------
diff --git a/client/tests/kvm/steps/RHEL-4.7-x86_64.steps b/client/tests/kvm/steps/RHEL-4.7-x86_64.steps
index 644446f..36f0109 100644
--- a/client/tests/kvm/steps/RHEL-4.7-x86_64.steps
+++ b/client/tests/kvm/steps/RHEL-4.7-x86_64.steps
@@ -6,7 +6,7 @@ step 8.84
screendump 20080101_000001_868fe81019ae64a0b066c4c0d4ebc4e1.ppm
# boot options
sleep 5
-barrier_2 194 59 101 59 8c4f6b29e4087e1bed13c40e4a6a904f 44 optional
+barrier_2 44 36 0 365 ea4c08daabe1f982b243fce9c5b542a0 44 optional
# Sending keys: ret
key ret
# --------------------------------
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] Fix bad logging calls
2009-06-08 4:01 ` [KVM-AUTOTEST PATCH 2/8] RHEL-4.7 step files: fix the initial boot barriers Lucas Meneghel Rodrigues
@ 2009-06-08 4:01 ` Lucas Meneghel Rodrigues
0 siblings, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-06-08 4:01 UTC (permalink / raw)
To: kvm; +Cc: Lucas Meneghel Rodrigues
During the conversion of kvm autotest to upstream coding standards,
some bad logging calls were left behind. This patch fixes them.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
client/tests/kvm/kvm_utils.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py
index 434190d..37a1f22 100644
--- a/client/tests/kvm/kvm_utils.py
+++ b/client/tests/kvm/kvm_utils.py
@@ -304,7 +304,7 @@ class kvm_spawn:
# Print some debugging info
if match == None and self.poll() != 0:
- logging.debug("Timeout elapsed or process terminated. Output:",
+ logging.debug("Timeout elapsed or process terminated. Output: %s",
format_str_for_message(data.strip()))
return (match, data)
@@ -465,8 +465,8 @@ class kvm_spawn:
# Print some debugging info
if status != 0:
- logging.debug("Command failed; status: %d, output:" % status \
- + format_str_for_message(output.strip()))
+ logging.debug("Command failed; status: %d, output: %s", status,
+ format_str_for_message(output.strip()))
return (status, output)
--
1.6.2.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-08 4:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-08 4:04 [PATCH 1/3] Make possible to use kvm_config as a standalone program Lucas Meneghel Rodrigues
2009-06-08 4:04 ` [PATCH 2/3] Fixing bad line breaks Lucas Meneghel Rodrigues
2009-06-08 4:04 ` [PATCH 3/3] Fix bad logging calls Lucas Meneghel Rodrigues
-- strict thread matches above, loose matches on Subject: below --
2009-06-08 4:01 [KVM-AUTOTEST PATCH 0/8] Re-submitting some of the patches on the patch queue Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [KVM-AUTOTEST PATCH 1/8] kvm_config: Allow for "=" in the value of a config parameter Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [PATCH 1/3] Make possible to use kvm_config as a standalone program Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [PATCH 2/3] Fixing bad line breaks Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [KVM-AUTOTEST PATCH 2/8] RHEL-4.7 step files: fix the initial boot barriers Lucas Meneghel Rodrigues
2009-06-08 4:01 ` [PATCH 3/3] Fix bad logging calls Lucas Meneghel Rodrigues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox