kvm test: Fix more incorrect long line breaks lying around.
PATCH 1/4 kvm test: Fix more incorrect long line breaks lying around.
--- client/tests/kvm/kvm_config.py | 14 +++++++------- client/tests/kvm/kvm_tests.py | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-)
client/tests/kvm/kvm_config.py +7 -7
@@ -302,9 +302,9 @@ class config: # Found an operator? if op_found: if self.debug and not restricted: - self.__debug_print(indented_line, - "Parsing operator (%d dicts in current " - "context)" % len_list) + self.__debug_print(indented_line, ("Parsing operator " + "(%d dicts in current " + "context)" % len_list)) (left, value) = self.split_and_strip(line, op_found) filters_and_key = self.split_and_strip(left, ":") filters = filters_and_key[:-1]
@@ -349,10 +349,10 @@ class config: break list = filtered_list if self.debug and not restricted: - self.__debug_print(indented_line, - "Parsing no/only (%d dicts in current " - "context, %d remain)" % - (len_list, len(list))) + self.__debug_print(indented_line, ("Parsing no/only " + "(%d dicts in current " + "context, %d remain)" % + (len_list, len(list)))) # Parse 'variants' elif line == "variants:":
client/tests/kvm/kvm_tests.py +6 -6
@@ -327,16 +327,16 @@ def run_autotest(test, params, env): logging.info(str(result)) if result[1] == "FAIL": status_fail = True - message_fail = "Test '%s' ended with FAIL" - " (info: '%s')" % (result[0], result[3]) + message_fail = ("Test '%s' ended with FAIL " + "(info: '%s')" % (result[0], result[3])) if result[1] == "ERROR": status_error = True - message_error = "Test '%s' ended with ERROR" - " (info: '%s')" % (result[0], result[3]) + message_error = ("Test '%s' ended with ERROR " + "(info: '%s')" % (result[0], result[3])) if result[1] == "ABORT": status_error = True - message_error = "Test '%s' ended with ABORT" - " (info: '%s')" % (result[0], result[3]) + message_error = ("Test '%s' ended with ABORT " + "(info: '%s')" % (result[0], result[3])) # Copy test results to the local bindir/guest_results logging.info("Copying results back from guest...")
Signature · 1 line
1.6.2.2
PATCH 2/4 kvm test config sample: change control file names for the autotest tests
Changing the names of the control files being used on the autotest test
--- client/tests/kvm/kvm_tests.cfg.sample | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
client/tests/kvm/kvm_tests.cfg.sample +3 -2
@@ -67,16 +67,17 @@ variants: - autotest: install setup type = autotest test_timeout = 720 - test_control_file = control variants: - sleeptest: test_name = sleeptest test_timeout = 30 + test_control_file = sleeptest.control - dbench: test_name = dbench - test_control_file = control.60 + test_control_file = dbench.control - bonnie: test_name = bonnie + test_control_file = bonnie.control - linux_s3: install setup type = linux_s3
Signature · 1 line
1.6.2.2
PATCH 3/4 kvm_tests: Use autotest log files to scan results
The 'autotest' kvm subtest was relying on autotest output, that now has the logging line prefixes. The logging line prefixes breaks the results parser, so we would either have to make the parser to strip the logging prefixes or read autotest status files generated on the results directory. The later is a simpler approach, so this patch implements it.
Also, copy control files defined inside self.bindir/autotest_control directory to the guest. This way we can create more complex control files to run in guests without having to touch other tests directories.
--- client/tests/kvm/kvm_tests.py | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-)
client/tests/kvm/kvm_tests.py +16 -6
@@ -296,20 +296,30 @@ def run_autotest(test, params, env): if status != 0: raise error.TestFail("Could not extract %s.tar.bz2" % test_name) + # Cleaning up old remaining results + session.sendline("rm -rf autotest/results/*") + # Copying the selected control file (located inside + # test.bindir/autotest_control to the autotest dir + control_file_path = os.path.join(test.bindir, "autotest_control", + test_control_file) + if not vm.scp_to_remote(control_file_path, "autotest/control"): + raise error.TestFail("Could not copy the test control file to guest") # Run the test logging.info("Running test '%s'..." % test_name) - session.sendline("cd autotest/tests/%s" % test_name) - session.sendline("rm -f ./%s.state" % test_control_file) + session.sendline("cd autotest") + session.sendline("rm -f control.state") session.read_up_to_prompt() - session.sendline("../../bin/autotest ./%s" % test_control_file) + session.sendline("bin/autotest control") logging.info("---------------- Test output ----------------") - match, output = session.read_up_to_prompt(timeout=test_timeout, - print_func=logging.info) + match = session.read_up_to_prompt(timeout=test_timeout, + print_func=logging.info)[0] logging.info("---------------- End of test output ----------------") if not match: raise error.TestFail("Timeout elapsed while waiting for test to" " complete") - + # Get the results generated by autotest + session.sendline("cat results/*/status") + output = session.read_up_to_prompt()[1] session.close() # Parse test results
Signature · 1 line
1.6.2.2
PATCH 4/4 Adding control files dir to kvm test
Adding an autotest_control dir with control files that will be used on the 'autotest' kvm test, with the original control files used on the old kvm_runtest_2 directory.
--- client/tests/kvm/autotest_control/bonnie.control | 21 ++++++++++++++++++++ client/tests/kvm/autotest_control/dbench.control | 20 +++++++++++++++++++ .../tests/kvm/autotest_control/sleeptest.control | 15 ++++++++++++++ 3 files changed, 56 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/autotest_control/bonnie.control create mode 100644 client/tests/kvm/autotest_control/dbench.control create mode 100644 client/tests/kvm/autotest_control/sleeptest.control
client/tests/kvm/autotest_control/bonnie.control new file +21 -0
@@ -0,0 +1,21 @@ +AUTHOR = "Martin Bligh <[email protected]>" +NAME = "bonnie" +TIME = "MEDIUM" +TEST_CLASS = "Kernel" +TEST_CATEGORY = "Functional" +TEST_TYPE = "client" +DOC = """\ +Bonnie is a benchmark which measures the performance of Unix file system +operations. Bonnie is concerned with identifying bottlenecks; the name is a +tribute to Bonnie Raitt, who knows how to use one. + +For more info, see http://www.textuality.com/bonnie/ + +This benchmark configuration run generates sustained write traffic +of 35-50MB/s of .1MB writes to just one disk. It appears to have a +sequential and a random workload. It gives profile measurements for: +throughput, %CPU rand seeks per second. Not sure if the the CPU numbers +are trustworthy. +""" + +job.run_test('bonnie')
client/tests/kvm/autotest_control/dbench.control new file +20 -0
@@ -0,0 +1,20 @@ +TIME="SHORT" +AUTHOR = "Martin Bligh <[email protected]>" +DOC = """ +dbench is one of our standard kernel stress tests. It produces filesystem +load like netbench originally did, but involves no network system calls. +Its results include throughput rates, which can be used for performance +analysis. + +More information on dbench can be found here: +http://samba.org/ftp/tridge/dbench/README + +Currently it needs to be updated in its configuration. It is a great test for +the higher level I/O systems but barely touches the disk right now. +""" +NAME = 'dbench' +TEST_CLASS = 'kernel' +TEST_CATEGORY = 'Functional' +TEST_TYPE = 'client' + +job.run_test('dbench', seconds=60)
client/tests/kvm/autotest_control/sleeptest.control new file +15 -0
@@ -0,0 +1,15 @@ +AUTHOR = "Autotest Team" +NAME = "Sleeptest" +TIME = "SHORT" +TEST_CATEGORY = "Functional" +TEST_CLASS = "General" +TEST_TYPE = "client" + +DOC = """ +This test simply sleeps for 1 second by default. It's a good way to test +profilers and double check that autotest is working. +The seconds argument can also be modified to make the machine sleep for as +long as needed. +""" + +job.run_test('sleeptest', seconds = 1)
Signature · 1 line
1.6.2.2
Re: [Autotest] [KVM-AUTOTEST PATCH 4/4] Adding control files dir to kvm test
That seems very strange ... why do you have to duplicate the existing control files?
Quoted 96 lines · Lucas Meneghel Rodrigues
Adding an
autotest_controldir with control files that will be used on the 'autotest' kvm test, with the original control files used on the oldkvm_runtest_2directory.Signed-off-by Lucas Meneghel Rodrigues <[email protected]>---
client/tests/kvm/autotest_control/bonnie.control | 21 ++++++++++++++++++++ client/tests/kvm/autotest_control/dbench.control | 20 +++++++++++++++++++ .../tests/kvm/autotest_control/sleeptest.control | 15 ++++++++++++++ 3 files changed, 56 insertions(+), 0 deletions(-)create mode 100644 client/tests/kvm/autotest_control/bonnie.control create mode 100644 client/tests/kvm/autotest_control/dbench.control create mode 100644 client/tests/kvm/autotest_control/sleeptest.control
client/tests/kvm/autotest_control/bonnie.control new file +21
-0@@ -0,0 +1,21 @@ +AUTHOR = "Martin Bligh <[email protected]>" +NAME = "bonnie" +TIME = "MEDIUM" +TEST_CLASS = "Kernel" +TEST_CATEGORY = "Functional" +TEST_TYPE = "client" +DOC = """\ +Bonnie is a benchmark which measures the performance of Unix file system +operations. Bonnie is concerned with identifying bottlenecks; the name is a +tribute to Bonnie Raitt, who knows how to use one. + +For more info, see http://www.textuality.com/bonnie/ + +This benchmark configuration run generates sustained write traffic +of 35-50MB/s of .1MB writes to just one disk. It appears to have a +sequential and a random workload. It gives profile measurements for: +throughput, %CPU rand seeks per second. Not sure if the the CPU numbers +are trustworthy. +""" + +job.run_test('bonnie')client/tests/kvm/autotest_control/dbench.control new file +20
-0@@ -0,0 +1,20 @@ +TIME="SHORT" +AUTHOR = "Martin Bligh <[email protected]>" +DOC = """ +dbench is one of our standard kernel stress tests. It produces filesystem +load like netbench originally did, but involves no network system calls. +Its results include throughput rates, which can be used for performance +analysis. + +More information on dbench can be found here: +http://samba.org/ftp/tridge/dbench/README + +Currently it needs to be updated in its configuration. It is a great test for +the higher level I/O systems but barely touches the disk right now. +""" +NAME = 'dbench' +TEST_CLASS = 'kernel' +TEST_CATEGORY = 'Functional' +TEST_TYPE = 'client' + +job.run_test('dbench', seconds=60)client/tests/kvm/autotest_control/sleeptest.control new file +15
-1@@ -0,0 +1,15 @@ +AUTHOR = "Autotest Team" +NAME = "Sleeptest" +TIME = "SHORT" +TEST_CATEGORY = "Functional" +TEST_CLASS = "General" +TEST_TYPE = "client" + +DOC = """ +This test simply sleeps for 1 second by default. It's a good way to test +profilers and double check that autotest is working. +The seconds argument can also be modified to make the machine sleep for as +long as needed. +""" + +job.run_test('sleeptest', seconds = 1) --1.6.2.2
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Re: [Autotest] [KVM-AUTOTEST PATCH 4/4] Adding control files dir to kvm test
Quoted 2 lines · Martin Bligh
That seems very strange ... why do you have to duplicate the existing control files?
In particular, in the old kvm autotest tree we used to have a control file, control.60 inside the dbench directory, that specifies a shorter (60s) run for dbench (cause the default 600s is too lengthy for the large amount of tests we run).
Instead of sending a patch creating it again inside the dbench test, I figured a separate dir with the control files we are wanting to run on the guests a better idea, cause we might want to run fancier control files on guests. Having the user specify the contents of the control file on our kvm_tests.cfg is also an option, but then we would need to handle better multi-line contents on our kvm_config configuration parser.
All in all, in order to get the old functionality OK I thought having this extra dir would be the best option.
Quoted 98 lines
Quoted 96 lines · Lucas Meneghel Rodrigues
Adding an
autotest_controldir with control files that will be used on the 'autotest' kvm test, with the original control files used on the oldkvm_runtest_2directory.Signed-off-by Lucas Meneghel Rodrigues <[email protected]>--- client/tests/kvm/autotest_control/bonnie.control | 21 ++++++++++++++++++++ client/tests/kvm/autotest_control/dbench.control | 20 +++++++++++++++++++ .../tests/kvm/autotest_control/sleeptest.control | 15 ++++++++++++++ 3 files changed, 56 insertions(+), 0 deletions(-) create mode 100644 client/tests/kvm/autotest_control/bonnie.control create mode 100644 client/tests/kvm/autotest_control/dbench.control create mode 100644 client/tests/kvm/autotest_control/sleeptest.controlclient/tests/kvm/autotest_control/bonnie.control new file +21
-0@@ -0,0 +1,21 @@ +AUTHOR = "Martin Bligh <[email protected]>" +NAME = "bonnie" +TIME = "MEDIUM" +TEST_CLASS = "Kernel" +TEST_CATEGORY = "Functional" +TEST_TYPE = "client" +DOC = """\ +Bonnie is a benchmark which measures the performance of Unix file system +operations. Bonnie is concerned with identifying bottlenecks; the name is a +tribute to Bonnie Raitt, who knows how to use one. + +For more info, see http://www.textuality.com/bonnie/ + +This benchmark configuration run generates sustained write traffic +of 35-50MB/s of .1MB writes to just one disk. It appears to have a +sequential and a random workload. It gives profile measurements for: +throughput, %CPU rand seeks per second. Not sure if the the CPU numbers +are trustworthy. +""" + +job.run_test('bonnie')client/tests/kvm/autotest_control/dbench.control new file +20
-0@@ -0,0 +1,20 @@ +TIME="SHORT" +AUTHOR = "Martin Bligh <[email protected]>" +DOC = """ +dbench is one of our standard kernel stress tests. It produces filesystem +load like netbench originally did, but involves no network system calls. +Its results include throughput rates, which can be used for performance +analysis. + +More information on dbench can be found here: +http://samba.org/ftp/tridge/dbench/README + +Currently it needs to be updated in its configuration. It is a great test for +the higher level I/O systems but barely touches the disk right now. +""" +NAME = 'dbench' +TEST_CLASS = 'kernel' +TEST_CATEGORY = 'Functional' +TEST_TYPE = 'client' + +job.run_test('dbench', seconds=60)client/tests/kvm/autotest_control/sleeptest.control new file +15
-1@@ -0,0 +1,15 @@ +AUTHOR = "Autotest Team" +NAME = "Sleeptest" +TIME = "SHORT" +TEST_CATEGORY = "Functional" +TEST_CLASS = "General" +TEST_TYPE = "client" + +DOC = """ +This test simply sleeps for 1 second by default. It's a good way to test +profilers and double check that autotest is working. +The seconds argument can also be modified to make the machine sleep for as +long as needed. +""" + +job.run_test('sleeptest', seconds = 1) --1.6.2.2
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Signature · 3 lines
Lucas Meneghel Rodrigues Software Engineer (QE) Red Hat - Emerging Technologies
Quoted 12 lines · ----- "Lucas Meneghel Rodrigues
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>--- client/tests/kvm/kvm_config.py | 14 +++++++------- client/tests/kvm/kvm_tests.py | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-)client/tests/kvm/kvm_config.py +0
-0
client/tests/kvm/kvm_config.py class config: · line 305
Quoted 7 lines
client/tests/kvm/kvm_config.py +1
-3@@ -302,9 +302,9 @@ class config: # Found an operator? if op_found: if self.debug and not restricted: - self.__debug_print(indented_line, - "Parsing operator (%d dicts in current " - "context)" % len_list) + self.__debug_print(indented_line, ("Parsing operator "
^
I don't think we need the parentheses opened here |
because the parameters are already enclosed in parentheses.
Quoted 6 lines
client/tests/kvm/kvm_config.py +2
-0+ "(%d dicts in current " + "context)" % len_list)) (left, value) = self.split_and_strip(line, op_found) filters_and_key = self.split_and_strip(left, ":") filters = filters_and_key[:-1]
client/tests/kvm/kvm_config.py class config: · line 352
Quoted 8 lines
client/tests/kvm/kvm_config.py +1
-4@@ -349,10 +349,10 @@ class config: break list = filtered_list if self.debug and not restricted: - self.__debug_print(indented_line, - "Parsing no/only (%d dicts in current " - "context, %d remain)" % - (len_list, len(list))) + self.__debug_print(indented_line, ("Parsing no/only "
^
I don't think we need the parentheses opened here |
Quoted 41 lines
client/tests/kvm/kvm_config.py +3
-0+ "(%d dicts in current " + "context, %d remain)" % + (len_list, len(list)))) # Parse 'variants' elif line == "variants:":client/tests/kvm/kvm_tests.py +6
-6@@ -327,16 +327,16 @@ def run_autotest(test, params, env): logging.info(str(result)) if result[1] == "FAIL": status_fail = True - message_fail = "Test '%s' ended with FAIL" - " (info: '%s')" % (result[0], result[3]) + message_fail = ("Test '%s' ended with FAIL " + "(info: '%s')" % (result[0], result[3])) if result[1] == "ERROR": status_error = True - message_error = "Test '%s' ended with ERROR" - " (info: '%s')" % (result[0], result[3]) + message_error = ("Test '%s' ended with ERROR " + "(info: '%s')" % (result[0], result[3])) if result[1] == "ABORT": status_error = True - message_error = "Test '%s' ended with ABORT" - " (info: '%s')" % (result[0], result[3]) + message_error = ("Test '%s' ended with ABORT " + "(info: '%s')" % (result[0], result[3])) # Copy test results to the local bindir/guest_results logging.info("Copying results back from guest...")Signature · 6 lines
1.6.2.2 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Quoted 22 lines · Michael Goldish
Quoted 12 lines · ----- "Lucas Meneghel Rodrigues
Signed-off-by Lucas Meneghel Rodrigues <[email protected]>--- client/tests/kvm/kvm_config.py | 14 +++++++------- client/tests/kvm/kvm_tests.py | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-)client/tests/kvm/kvm_config.py +0
-0client/tests/kvm/kvm_config.py class config: · line 305
Quoted 7 lines
client/tests/kvm/kvm_config.py +1
-3@@ -302,9 +302,9 @@ class config: # Found an operator? if op_found: if self.debug and not restricted: - self.__debug_print(indented_line, - "Parsing operator (%d dicts in current " - "context)" % len_list) + self.__debug_print(indented_line, ("Parsing operator "^
Quoted 2 lines
I don't think we need the parentheses opened here |
because the parameters are already enclosed in parentheses.
Ooops, you are right, I am going to apply the patch minus these two changes. Thanks!
Quoted 59 lines
Quoted 7 lines
client/tests/kvm/kvm_config.py +2
-0+ "(%d dicts in current " + "context)" % len_list)) (left, value) = self.split_and_strip(line, op_found) filters_and_key = self.split_and_strip(left, ":") filters = filters_and_key[:-1]client/tests/kvm/kvm_config.py class config: · line 352
Quoted 8 lines
client/tests/kvm/kvm_config.py +1
-4@@ -349,10 +349,10 @@ class config: break list = filtered_list if self.debug and not restricted: - self.__debug_print(indented_line, - "Parsing no/only (%d dicts in current " - "context, %d remain)" % - (len_list, len(list))) + self.__debug_print(indented_line, ("Parsing no/only "^I don't think we need the parentheses opened here |
Quoted 41 lines
client/tests/kvm/kvm_config.py +3
-0+ "(%d dicts in current " + "context, %d remain)" % + (len_list, len(list)))) # Parse 'variants' elif line == "variants:":client/tests/kvm/kvm_tests.py +6
-6@@ -327,16 +327,16 @@ def run_autotest(test, params, env): logging.info(str(result)) if result[1] == "FAIL": status_fail = True - message_fail = "Test '%s' ended with FAIL" - " (info: '%s')" % (result[0], result[3]) + message_fail = ("Test '%s' ended with FAIL " + "(info: '%s')" % (result[0], result[3])) if result[1] == "ERROR": status_error = True - message_error = "Test '%s' ended with ERROR" - " (info: '%s')" % (result[0], result[3]) + message_error = ("Test '%s' ended with ERROR " + "(info: '%s')" % (result[0], result[3])) if result[1] == "ABORT": status_error = True - message_error = "Test '%s' ended with ABORT" - " (info: '%s')" % (result[0], result[3]) + message_error = ("Test '%s' ended with ABORT " + "(info: '%s')" % (result[0], result[3])) # Copy test results to the local bindir/guest_results logging.info("Copying results back from guest...")Signature · 6 lines
1.6.2.2 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
Signature · 3 lines
Lucas Meneghel Rodrigues Software Engineer (QE) Red Hat - Emerging Technologies