1 | The following changes since commit 8c5f94cd4182753959c8be8de415120dc879d8f0: | 1 | The following changes since commit 15ef89d2a1a7b93845a6b09c2ee8e1979f6eb30b: |
---|---|---|---|
2 | 2 | ||
3 | Merge tag 'pull-loong-20211221-2' of https://gitlab.com/rth7680/qemu into staging (2021-12-21 13:30:35 -0800) | 3 | Update version for v7.0.0-rc1 release (2022-03-22 22:58:44 +0000) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://gitlab.com/hreitz/qemu.git tags/pull-block-2021-12-22 | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 722f87df2545b308aec49b459b028f0802b4fd9e: | 9 | for you to fetch changes up to 2539eade4f689eda7e9fe45486f18334bfbafaf0: |
10 | 10 | ||
11 | iotests: check: multiprocessing support (2021-12-22 16:29:48 +0100) | 11 | hw: Fix misleading hexadecimal format (2022-03-24 10:38:42 +0000) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block patches: | 14 | Pull request |
15 | - Added support to the iotests for running tests in several parallel | 15 | |
16 | jobs (using the new -j parameter) | 16 | Philippe found cases where the 0x%d format string was used, leading to |
17 | misleading output. The patches look harmless and could save people time, so I | ||
18 | think it's worth including them in 7.0. | ||
17 | 19 | ||
18 | ---------------------------------------------------------------- | 20 | ---------------------------------------------------------------- |
19 | Vladimir Sementsov-Ogievskiy (3): | ||
20 | iotests/testrunner.py: add doc string for run_test() | ||
21 | iotests/testrunner.py: move updating last_elapsed to run_tests | ||
22 | iotests: check: multiprocessing support | ||
23 | 21 | ||
24 | tests/qemu-iotests/check | 4 +- | 22 | Philippe Mathieu-Daudé (2): |
25 | tests/qemu-iotests/testrunner.py | 86 ++++++++++++++++++++++++++++---- | 23 | block: Fix misleading hexadecimal format |
26 | 2 files changed, 80 insertions(+), 10 deletions(-) | 24 | hw: Fix misleading hexadecimal format |
25 | |||
26 | block/parallels-ext.c | 2 +- | ||
27 | hw/i386/sgx.c | 2 +- | ||
28 | hw/i386/trace-events | 6 +++--- | ||
29 | hw/misc/trace-events | 4 ++-- | ||
30 | hw/scsi/trace-events | 4 ++-- | ||
31 | 5 files changed, 9 insertions(+), 9 deletions(-) | ||
27 | 32 | ||
28 | -- | 33 | -- |
29 | 2.33.1 | 34 | 2.35.1 |
30 | 35 | ||
31 | diff view generated by jsdifflib |
1 | From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> |
---|---|---|---|
2 | 2 | ||
3 | Add -j <JOBS> parameter, to run tests in several jobs simultaneously. | 3 | "0x%u" format is very misleading, replace by "0x%x". |
4 | For realization - simply utilize multiprocessing.Pool class. | ||
5 | 4 | ||
6 | Notes: | 5 | Found running: |
7 | 6 | ||
8 | 1. Of course, tests can't run simultaneously in same TEST_DIR. So, | 7 | $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' block/ |
9 | use subdirectories TEST_DIR/testname/ and SOCK_DIR/testname/ | ||
10 | instead of simply TEST_DIR and SOCK_DIR | ||
11 | 8 | ||
12 | 2. multiprocessing.Pool.starmap function doesn't support passing | 9 | Inspired-by: Richard Henderson <richard.henderson@linaro.org> |
13 | context managers, so we can't simply pass "self". Happily, we need | 10 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> |
14 | self only for read-only access, and it just works if it is defined | 11 | Reviewed-by: Hanna Reitz <hreitz@redhat.com> |
15 | in global space. So, add a temporary link TestRunner.shared_self | 12 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
16 | during run_tests(). | 13 | Reviewed-by: Denis V. Lunev <den@openvz.org> |
14 | Message-id: 20220323114718.58714-2-philippe.mathieu.daude@gmail.com | ||
15 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
16 | --- | ||
17 | block/parallels-ext.c | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | 19 | ||
18 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 20 | diff --git a/block/parallels-ext.c b/block/parallels-ext.c |
19 | Message-Id: <20211203122223.2780098-4-vsementsov@virtuozzo.com> | ||
20 | Reviewed-by: John Snow <jsnow@redhat.com> | ||
21 | Tested-by: John Snow <jsnow@redhat.com> | ||
22 | Signed-off-by: Hanna Reitz <hreitz@redhat.com> | ||
23 | --- | ||
24 | tests/qemu-iotests/check | 4 +- | ||
25 | tests/qemu-iotests/testrunner.py | 69 ++++++++++++++++++++++++++++---- | ||
26 | 2 files changed, 64 insertions(+), 9 deletions(-) | ||
27 | |||
28 | diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check | ||
29 | index XXXXXXX..XXXXXXX 100755 | ||
30 | --- a/tests/qemu-iotests/check | ||
31 | +++ b/tests/qemu-iotests/check | ||
32 | @@ -XXX,XX +XXX,XX @@ def make_argparser() -> argparse.ArgumentParser: | ||
33 | help='show me, do not run tests') | ||
34 | p.add_argument('-makecheck', action='store_true', | ||
35 | help='pretty print output for make check') | ||
36 | + p.add_argument('-j', dest='jobs', type=int, default=1, | ||
37 | + help='run tests in multiple parallel jobs') | ||
38 | |||
39 | p.add_argument('-d', dest='debug', action='store_true', help='debug') | ||
40 | p.add_argument('-p', dest='print', action='store_true', | ||
41 | @@ -XXX,XX +XXX,XX @@ if __name__ == '__main__': | ||
42 | with TestRunner(env, makecheck=args.makecheck, | ||
43 | color=args.color) as tr: | ||
44 | paths = [os.path.join(env.source_iotests, t) for t in tests] | ||
45 | - ok = tr.run_tests(paths) | ||
46 | + ok = tr.run_tests(paths, args.jobs) | ||
47 | if not ok: | ||
48 | sys.exit(1) | ||
49 | diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py | ||
50 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
51 | --- a/tests/qemu-iotests/testrunner.py | 22 | --- a/block/parallels-ext.c |
52 | +++ b/tests/qemu-iotests/testrunner.py | 23 | +++ b/block/parallels-ext.c |
53 | @@ -XXX,XX +XXX,XX @@ | 24 | @@ -XXX,XX +XXX,XX @@ static int parallels_parse_format_extension(BlockDriverState *bs, |
54 | import json | 25 | break; |
55 | import termios | 26 | |
56 | import sys | 27 | default: |
57 | +from multiprocessing import Pool | 28 | - error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic); |
58 | from contextlib import contextmanager | 29 | + error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic); |
59 | from typing import List, Optional, Iterator, Any, Sequence, Dict, \ | 30 | goto fail; |
60 | ContextManager | 31 | } |
61 | @@ -XXX,XX +XXX,XX @@ def __init__(self, status: str, description: str = '', | ||
62 | |||
63 | |||
64 | class TestRunner(ContextManager['TestRunner']): | ||
65 | + shared_self = None | ||
66 | + | ||
67 | + @staticmethod | ||
68 | + def proc_run_test(test: str, test_field_width: int) -> TestResult: | ||
69 | + # We are in a subprocess, we can't change the runner object! | ||
70 | + runner = TestRunner.shared_self | ||
71 | + assert runner is not None | ||
72 | + return runner.run_test(test, test_field_width, mp=True) | ||
73 | + | ||
74 | + def run_tests_pool(self, tests: List[str], | ||
75 | + test_field_width: int, jobs: int) -> List[TestResult]: | ||
76 | + | ||
77 | + # passing self directly to Pool.starmap() just doesn't work, because | ||
78 | + # it's a context manager. | ||
79 | + assert TestRunner.shared_self is None | ||
80 | + TestRunner.shared_self = self | ||
81 | + | ||
82 | + with Pool(jobs) as p: | ||
83 | + results = p.starmap(self.proc_run_test, | ||
84 | + zip(tests, [test_field_width] * len(tests))) | ||
85 | + | ||
86 | + TestRunner.shared_self = None | ||
87 | + | ||
88 | + return results | ||
89 | + | ||
90 | def __init__(self, env: TestEnv, makecheck: bool = False, | ||
91 | color: str = 'auto') -> None: | ||
92 | self.env = env | ||
93 | @@ -XXX,XX +XXX,XX @@ def find_reference(self, test: str) -> str: | ||
94 | |||
95 | return f'{test}.out' | ||
96 | |||
97 | - def do_run_test(self, test: str) -> TestResult: | ||
98 | + def do_run_test(self, test: str, mp: bool) -> TestResult: | ||
99 | """ | ||
100 | Run one test | ||
101 | |||
102 | :param test: test file path | ||
103 | + :param mp: if true, we are in a multiprocessing environment, use | ||
104 | + personal subdirectories for test run | ||
105 | + | ||
106 | + Note: this method may be called from subprocess, so it does not | ||
107 | + change ``self`` object in any way! | ||
108 | """ | ||
109 | |||
110 | f_test = Path(test) | ||
111 | @@ -XXX,XX +XXX,XX @@ def do_run_test(self, test: str) -> TestResult: | ||
112 | |||
113 | args = [str(f_test.resolve())] | ||
114 | env = self.env.prepare_subprocess(args) | ||
115 | + if mp: | ||
116 | + # Split test directories, so that tests running in parallel don't | ||
117 | + # break each other. | ||
118 | + for d in ['TEST_DIR', 'SOCK_DIR']: | ||
119 | + env[d] = os.path.join(env[d], f_test.name) | ||
120 | + Path(env[d]).mkdir(parents=True, exist_ok=True) | ||
121 | |||
122 | t0 = time.time() | ||
123 | with f_bad.open('w', encoding="utf-8") as f: | ||
124 | @@ -XXX,XX +XXX,XX @@ def do_run_test(self, test: str) -> TestResult: | ||
125 | casenotrun=casenotrun) | ||
126 | |||
127 | def run_test(self, test: str, | ||
128 | - test_field_width: Optional[int] = None) -> TestResult: | ||
129 | + test_field_width: Optional[int] = None, | ||
130 | + mp: bool = False) -> TestResult: | ||
131 | """ | ||
132 | Run one test and print short status | ||
133 | |||
134 | :param test: test file path | ||
135 | :param test_field_width: width for first field of status format | ||
136 | + :param mp: if true, we are in a multiprocessing environment, don't try | ||
137 | + to rewrite things in stdout | ||
138 | + | ||
139 | + Note: this method may be called from subprocess, so it does not | ||
140 | + change ``self`` object in any way! | ||
141 | """ | ||
142 | |||
143 | last_el = self.last_elapsed.get(test) | ||
144 | start = datetime.datetime.now().strftime('%H:%M:%S') | ||
145 | |||
146 | if not self.makecheck: | ||
147 | - self.test_print_one_line(test=test, starttime=start, | ||
148 | - lasttime=last_el, end='\r', | ||
149 | + self.test_print_one_line(test=test, | ||
150 | + status = 'started' if mp else '...', | ||
151 | + starttime=start, | ||
152 | + lasttime=last_el, | ||
153 | + end = '\n' if mp else '\r', | ||
154 | test_field_width=test_field_width) | ||
155 | |||
156 | - res = self.do_run_test(test) | ||
157 | + res = self.do_run_test(test, mp) | ||
158 | |||
159 | end = datetime.datetime.now().strftime('%H:%M:%S') | ||
160 | self.test_print_one_line(test=test, status=res.status, | ||
161 | @@ -XXX,XX +XXX,XX @@ def run_test(self, test: str, | ||
162 | |||
163 | return res | ||
164 | |||
165 | - def run_tests(self, tests: List[str]) -> bool: | ||
166 | + def run_tests(self, tests: List[str], jobs: int = 1) -> bool: | ||
167 | n_run = 0 | ||
168 | failed = [] | ||
169 | notrun = [] | ||
170 | @@ -XXX,XX +XXX,XX @@ def run_tests(self, tests: List[str]) -> bool: | ||
171 | |||
172 | test_field_width = max(len(os.path.basename(t)) for t in tests) + 2 | ||
173 | |||
174 | - for t in tests: | ||
175 | + if jobs > 1: | ||
176 | + results = self.run_tests_pool(tests, test_field_width, jobs) | ||
177 | + | ||
178 | + for i, t in enumerate(tests): | ||
179 | name = os.path.basename(t) | ||
180 | - res = self.run_test(t, test_field_width=test_field_width) | ||
181 | + | ||
182 | + if jobs > 1: | ||
183 | + res = results[i] | ||
184 | + else: | ||
185 | + res = self.run_test(t, test_field_width) | ||
186 | |||
187 | assert res.status in ('pass', 'fail', 'not run') | ||
188 | 32 | ||
189 | -- | 33 | -- |
190 | 2.33.1 | 34 | 2.35.1 |
191 | 35 | ||
192 | 36 | diff view generated by jsdifflib |
1 | From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> |
---|---|---|---|
2 | 2 | ||
3 | We are going to modify these methods and will add more documentation in | 3 | "0x%u" format is very misleading, replace by "0x%x". |
4 | further commit. As a preparation add basic documentation. | ||
5 | 4 | ||
6 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 5 | Found running: |
7 | Message-Id: <20211203122223.2780098-2-vsementsov@virtuozzo.com> | 6 | |
8 | Reviewed-by: John Snow <jsnow@redhat.com> | 7 | $ git grep -E '0x%[0-9]*([lL]*|" ?PRI)[dDuU]' hw/ |
9 | Tested-by: John Snow <jsnow@redhat.com> | 8 | |
10 | Signed-off-by: Hanna Reitz <hreitz@redhat.com> | 9 | Inspired-by: Richard Henderson <richard.henderson@linaro.org> |
10 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
11 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
12 | Message-id: 20220323114718.58714-3-philippe.mathieu.daude@gmail.com | ||
13 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
11 | --- | 14 | --- |
12 | tests/qemu-iotests/testrunner.py | 13 +++++++++++++ | 15 | hw/i386/sgx.c | 2 +- |
13 | 1 file changed, 13 insertions(+) | 16 | hw/i386/trace-events | 6 +++--- |
17 | hw/misc/trace-events | 4 ++-- | ||
18 | hw/scsi/trace-events | 4 ++-- | ||
19 | 4 files changed, 8 insertions(+), 8 deletions(-) | ||
14 | 20 | ||
15 | diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py | 21 | diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c |
16 | index XXXXXXX..XXXXXXX 100644 | 22 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/tests/qemu-iotests/testrunner.py | 23 | --- a/hw/i386/sgx.c |
18 | +++ b/tests/qemu-iotests/testrunner.py | 24 | +++ b/hw/i386/sgx.c |
19 | @@ -XXX,XX +XXX,XX @@ def find_reference(self, test: str) -> str: | 25 | @@ -XXX,XX +XXX,XX @@ void pc_machine_init_sgx_epc(PCMachineState *pcms) |
20 | return f'{test}.out' | 26 | } |
21 | 27 | ||
22 | def do_run_test(self, test: str) -> TestResult: | 28 | if ((sgx_epc->base + sgx_epc->size) < sgx_epc->base) { |
23 | + """ | 29 | - error_report("Size of all 'sgx-epc' =0x%"PRIu64" causes EPC to wrap", |
24 | + Run one test | 30 | + error_report("Size of all 'sgx-epc' =0x%"PRIx64" causes EPC to wrap", |
25 | + | 31 | sgx_epc->size); |
26 | + :param test: test file path | 32 | exit(EXIT_FAILURE); |
27 | + """ | 33 | } |
28 | + | 34 | diff --git a/hw/i386/trace-events b/hw/i386/trace-events |
29 | f_test = Path(test) | 35 | index XXXXXXX..XXXXXXX 100644 |
30 | f_bad = Path(f_test.name + '.out.bad') | 36 | --- a/hw/i386/trace-events |
31 | f_notrun = Path(f_test.name + '.notrun') | 37 | +++ b/hw/i386/trace-events |
32 | @@ -XXX,XX +XXX,XX @@ def do_run_test(self, test: str) -> TestResult: | 38 | @@ -XXX,XX +XXX,XX @@ vtd_fault_disabled(void) "Fault processing disabled for context entry" |
33 | 39 | vtd_replay_ce_valid(const char *mode, uint8_t bus, uint8_t dev, uint8_t fn, uint16_t domain, uint64_t hi, uint64_t lo) "%s: replay valid context device %02"PRIx8":%02"PRIx8".%02"PRIx8" domain 0x%"PRIx16" hi 0x%"PRIx64" lo 0x%"PRIx64 | |
34 | def run_test(self, test: str, | 40 | vtd_replay_ce_invalid(uint8_t bus, uint8_t dev, uint8_t fn) "replay invalid context device %02"PRIx8":%02"PRIx8".%02"PRIx8 |
35 | test_field_width: Optional[int] = None) -> TestResult: | 41 | vtd_page_walk_level(uint64_t addr, uint32_t level, uint64_t start, uint64_t end) "walk (base=0x%"PRIx64", level=%"PRIu32") iova range 0x%"PRIx64" - 0x%"PRIx64 |
36 | + """ | 42 | -vtd_page_walk_one(uint16_t domain, uint64_t iova, uint64_t gpa, uint64_t mask, int perm) "domain 0x%"PRIu16" iova 0x%"PRIx64" -> gpa 0x%"PRIx64" mask 0x%"PRIx64" perm %d" |
37 | + Run one test and print short status | 43 | +vtd_page_walk_one(uint16_t domain, uint64_t iova, uint64_t gpa, uint64_t mask, int perm) "domain 0x%"PRIx16" iova 0x%"PRIx64" -> gpa 0x%"PRIx64" mask 0x%"PRIx64" perm %d" |
38 | + | 44 | vtd_page_walk_one_skip_map(uint64_t iova, uint64_t mask, uint64_t translated) "iova 0x%"PRIx64" mask 0x%"PRIx64" translated 0x%"PRIx64 |
39 | + :param test: test file path | 45 | vtd_page_walk_one_skip_unmap(uint64_t iova, uint64_t mask) "iova 0x%"PRIx64" mask 0x%"PRIx64 |
40 | + :param test_field_width: width for first field of status format | 46 | vtd_page_walk_skip_read(uint64_t iova, uint64_t next) "Page walk skip iova 0x%"PRIx64" - 0x%"PRIx64" due to unable to read" |
41 | + """ | 47 | vtd_page_walk_skip_reserve(uint64_t iova, uint64_t next) "Page walk skip iova 0x%"PRIx64" - 0x%"PRIx64" due to rsrv set" |
42 | + | 48 | vtd_switch_address_space(uint8_t bus, uint8_t slot, uint8_t fn, bool on) "Device %02x:%02x.%x switching address space (iommu enabled=%d)" |
43 | last_el = self.last_elapsed.get(test) | 49 | vtd_as_unmap_whole(uint8_t bus, uint8_t slot, uint8_t fn, uint64_t iova, uint64_t size) "Device %02x:%02x.%x start 0x%"PRIx64" size 0x%"PRIx64 |
44 | start = datetime.datetime.now().strftime('%H:%M:%S') | 50 | -vtd_translate_pt(uint16_t sid, uint64_t addr) "source id 0x%"PRIu16", iova 0x%"PRIx64 |
45 | 51 | -vtd_pt_enable_fast_path(uint16_t sid, bool success) "sid 0x%"PRIu16" %d" | |
52 | +vtd_translate_pt(uint16_t sid, uint64_t addr) "source id 0x%"PRIx16", iova 0x%"PRIx64 | ||
53 | +vtd_pt_enable_fast_path(uint16_t sid, bool success) "sid 0x%"PRIx16" %d" | ||
54 | vtd_irq_generate(uint64_t addr, uint64_t data) "addr 0x%"PRIx64" data 0x%"PRIx64 | ||
55 | vtd_reg_read(uint64_t addr, uint64_t size) "addr 0x%"PRIx64" size 0x%"PRIx64 | ||
56 | vtd_reg_write(uint64_t addr, uint64_t size, uint64_t val) "addr 0x%"PRIx64" size 0x%"PRIx64" value 0x%"PRIx64 | ||
57 | diff --git a/hw/misc/trace-events b/hw/misc/trace-events | ||
58 | index XXXXXXX..XXXXXXX 100644 | ||
59 | --- a/hw/misc/trace-events | ||
60 | +++ b/hw/misc/trace-events | ||
61 | @@ -XXX,XX +XXX,XX @@ | ||
62 | # See docs/devel/tracing.rst for syntax documentation. | ||
63 | |||
64 | # allwinner-cpucfg.c | ||
65 | -allwinner_cpucfg_cpu_reset(uint8_t cpu_id, uint32_t reset_addr) "id %u, reset_addr 0x%" PRIu32 | ||
66 | +allwinner_cpucfg_cpu_reset(uint8_t cpu_id, uint32_t reset_addr) "id %u, reset_addr 0x%" PRIx32 | ||
67 | allwinner_cpucfg_read(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32 | ||
68 | allwinner_cpucfg_write(uint64_t offset, uint64_t data, unsigned size) "offset 0x%" PRIx64 " data 0x%" PRIx64 " size %" PRIu32 | ||
69 | |||
70 | @@ -XXX,XX +XXX,XX @@ imx7_gpr_write(uint64_t offset, uint64_t value) "addr 0x%08" PRIx64 "value 0x%08 | ||
71 | |||
72 | # mos6522.c | ||
73 | mos6522_set_counter(int index, unsigned int val) "T%d.counter=%d" | ||
74 | -mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRId64 " delta_next=0x%"PRId64 | ||
75 | +mos6522_get_next_irq_time(uint16_t latch, int64_t d, int64_t delta) "latch=%d counter=0x%"PRIx64 " delta_next=0x%"PRIx64 | ||
76 | mos6522_set_sr_int(void) "set sr_int" | ||
77 | mos6522_write(uint64_t addr, const char *name, uint64_t val) "reg=0x%"PRIx64 " [%s] val=0x%"PRIx64 | ||
78 | mos6522_read(uint64_t addr, const char *name, unsigned val) "reg=0x%"PRIx64 " [%s] val=0x%x" | ||
79 | diff --git a/hw/scsi/trace-events b/hw/scsi/trace-events | ||
80 | index XXXXXXX..XXXXXXX 100644 | ||
81 | --- a/hw/scsi/trace-events | ||
82 | +++ b/hw/scsi/trace-events | ||
83 | @@ -XXX,XX +XXX,XX @@ lsi_bad_phase_interrupt(void) "Phase mismatch interrupt" | ||
84 | lsi_bad_selection(uint32_t id) "Selected absent target %"PRIu32 | ||
85 | lsi_do_dma_unavailable(void) "DMA no data available" | ||
86 | lsi_do_dma(uint64_t addr, int len) "DMA addr=0x%"PRIx64" len=%d" | ||
87 | -lsi_queue_command(uint32_t tag) "Queueing tag=0x%"PRId32 | ||
88 | +lsi_queue_command(uint32_t tag) "Queueing tag=0x%"PRIx32 | ||
89 | lsi_add_msg_byte_error(void) "MSG IN data too long" | ||
90 | lsi_add_msg_byte(uint8_t data) "MSG IN 0x%02x" | ||
91 | lsi_reselect(int id) "Reselected target %d" | ||
92 | @@ -XXX,XX +XXX,XX @@ lsi_do_msgout_noop(void) "MSG: No Operation" | ||
93 | lsi_do_msgout_extended(uint8_t msg, uint8_t len) "Extended message 0x%x (len %d)" | ||
94 | lsi_do_msgout_ignored(const char *msg) "%s (ignored)" | ||
95 | lsi_do_msgout_simplequeue(uint8_t select_tag) "SIMPLE queue tag=0x%x" | ||
96 | -lsi_do_msgout_abort(uint32_t tag) "MSG: ABORT TAG tag=0x%"PRId32 | ||
97 | +lsi_do_msgout_abort(uint32_t tag) "MSG: ABORT TAG tag=0x%"PRIx32 | ||
98 | lsi_do_msgout_clearqueue(uint32_t tag) "MSG: CLEAR QUEUE tag=0x%"PRIx32 | ||
99 | lsi_do_msgout_busdevicereset(uint32_t tag) "MSG: BUS DEVICE RESET tag=0x%"PRIx32 | ||
100 | lsi_do_msgout_select(int id) "Select LUN %d" | ||
46 | -- | 101 | -- |
47 | 2.33.1 | 102 | 2.35.1 |
48 | 103 | ||
49 | 104 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
2 | 1 | ||
3 | We are going to use do_run_test() in multiprocessing environment, where | ||
4 | we'll not be able to change original runner object. | ||
5 | |||
6 | Happily, the only thing we change is that last_elapsed and it's simple | ||
7 | to do it in run_tests() instead. All other accesses to self in | ||
8 | do_runt_test() and in run_test() are read-only. | ||
9 | |||
10 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
11 | Message-Id: <20211203122223.2780098-3-vsementsov@virtuozzo.com> | ||
12 | Reviewed-by: John Snow <jsnow@redhat.com> | ||
13 | Tested-by: John Snow <jsnow@redhat.com> | ||
14 | Signed-off-by: Hanna Reitz <hreitz@redhat.com> | ||
15 | --- | ||
16 | tests/qemu-iotests/testrunner.py | 4 +++- | ||
17 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py | ||
20 | index XXXXXXX..XXXXXXX 100644 | ||
21 | --- a/tests/qemu-iotests/testrunner.py | ||
22 | +++ b/tests/qemu-iotests/testrunner.py | ||
23 | @@ -XXX,XX +XXX,XX @@ def do_run_test(self, test: str) -> TestResult: | ||
24 | diff=diff, casenotrun=casenotrun) | ||
25 | else: | ||
26 | f_bad.unlink() | ||
27 | - self.last_elapsed.update(test, elapsed) | ||
28 | return TestResult(status='pass', elapsed=elapsed, | ||
29 | casenotrun=casenotrun) | ||
30 | |||
31 | @@ -XXX,XX +XXX,XX @@ def run_tests(self, tests: List[str]) -> bool: | ||
32 | print('\n'.join(res.diff)) | ||
33 | elif res.status == 'not run': | ||
34 | notrun.append(name) | ||
35 | + elif res.status == 'pass': | ||
36 | + assert res.elapsed is not None | ||
37 | + self.last_elapsed.update(t, res.elapsed) | ||
38 | |||
39 | sys.stdout.flush() | ||
40 | if res.interrupted: | ||
41 | -- | ||
42 | 2.33.1 | ||
43 | |||
44 | diff view generated by jsdifflib |