Skip to content

Commit e309b8f

Browse files
committed
Drop obsolete --sr-disk* options and their use in jobs and examples
The old options had been missed and kept as no-op, which should not be a problem for any caller using "auto" (which was anyway the only sensible choice for a generic script). Signed-off-by: Yann Dirson <[email protected]>
1 parent f0a42d4 commit e309b8f

File tree

7 files changed

+9
-44
lines changed

7 files changed

+9
-44
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Here's an example of selection we can do thanks to the markers:
205205

206206
```
207207
# Run storage driver tests that either need no VM at all, or advise to use a small VM. Exclude tests that reboot the hosts.
208-
pytest tests/storage -m "(small_vm or no_vm) and not reboot" --hosts=ip_of_poolmaster1,ip_of_poolmaster2 --vm=http://path/to/a_small_vm.xva --sr-disk=auto
208+
pytest tests/storage -m "(small_vm or no_vm) and not reboot" --hosts=ip_of_poolmaster1,ip_of_poolmaster2 --vm=http://path/to/a_small_vm.xva
209209
```
210210

211211
Another example:

conftest.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,6 @@ def pytest_addoption(parser):
9292
"DISKS is a possibly-empty comma-separated list. "
9393
"No mention of a given host authorizes use of all its disks."
9494
)
95-
parser.addoption(
96-
"--sr-disk",
97-
action="append",
98-
default=[],
99-
help="Name of an available disk (sdb) or partition device (sdb2) to be formatted and used in storage tests. "
100-
"Set it to 'auto' to let the fixtures auto-detect available disks."
101-
)
102-
parser.addoption(
103-
"--sr-disk-4k",
104-
action="append",
105-
default=[],
106-
help="Name of an available disk (sdb) or partition device (sdb2) with "
107-
"4KiB blocksize to be formatted and used in storage tests. "
108-
"Set it to 'auto' to let the fixtures auto-detect available disks."
109-
)
11095

11196
def pytest_configure(config):
11297
global_config.ignore_ssh_banner = config.getoption('--ignore-ssh-banner')

jobs.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"nb_pools": 2,
2121
"params": {
2222
"--vm": "single/small_vm",
23-
"--sr-disk": "auto",
2423
},
2524
"paths": [
2625
"tests/misc",
@@ -46,7 +45,6 @@
4645
"nb_pools": 2,
4746
"params": {
4847
"--vm[]": "multi/all_unix",
49-
"--sr-disk": "auto",
5048
},
5149
"paths": ["tests/misc", "tests/migration"],
5250
"markers": "multi_vms and not flaky and not reboot",
@@ -62,7 +60,6 @@
6260
"nb_pools": 2,
6361
"params": {
6462
"--vm[]": "multi/all_windows",
65-
"--sr-disk": "auto",
6663
},
6764
"paths": ["tests/misc", "tests/migration"],
6865
"markers": "multi_vms and not flaky and not reboot",
@@ -88,7 +85,6 @@
8885
"nb_pools": 1,
8986
"params": {
9087
"--vm": "single/small_vm",
91-
"--sr-disk": "auto",
9288
},
9389
"paths": ["tests/storage"],
9490
"markers": "(small_vm or no_vm) and not reboot and not quicktest and not unused_4k_disks",
@@ -106,7 +102,6 @@
106102
"nb_pools": 2,
107103
"params": {
108104
"--vm": "single/small_vm",
109-
"--sr-disk": "auto",
110105
},
111106
"paths": ["tests/storage"],
112107
"markers": "not unused_4k_disks",
@@ -123,7 +118,6 @@
123118
"nb_pools": 1,
124119
"params": {
125120
"--vm": "single/small_vm",
126-
"--sr-disk": "auto",
127121
},
128122
"paths": ["tests/storage"],
129123
"markers": "reboot and not flaky and not unused_4k_disks",
@@ -138,7 +132,6 @@
138132
],
139133
"nb_pools": 1,
140134
"params": {
141-
"--sr-disk": "auto",
142135
},
143136
"paths": ["tests/storage"],
144137
"markers": "quicktest and not unused_4k_disks",
@@ -154,7 +147,6 @@
154147
"nb_pools": 1,
155148
"params": {
156149
"--vm": "single/small_vm",
157-
"--sr-disk": "auto",
158150
},
159151
"paths": ["tests/storage/linstor"],
160152
"markers": "(small_vm or no_vm) and not reboot and not quicktest",
@@ -171,7 +163,6 @@
171163
"nb_pools": 2,
172164
"params": {
173165
"--vm": "single/small_vm",
174-
"--sr-disk": "auto",
175166
},
176167
"paths": ["tests/storage/linstor"],
177168
"markers": "",
@@ -187,7 +178,6 @@
187178
"nb_pools": 1,
188179
"params": {
189180
"--vm": "single/small_vm",
190-
"--sr-disk": "auto",
191181
},
192182
"paths": ["tests/storage/linstor"],
193183
"markers": "reboot",
@@ -200,7 +190,6 @@
200190
],
201191
"nb_pools": 1,
202192
"params": {
203-
"--sr-disk": "auto",
204193
},
205194
"paths": ["tests/storage/linstor"],
206195
"markers": "quicktest",
@@ -215,7 +204,6 @@
215204
"nb_pools": 1,
216205
"params": {
217206
"--vm": "single/small_vm",
218-
"--sr-disk-4k": "auto",
219207
},
220208
"paths": ["tests/storage"],
221209
"markers": "(small_vm or no_vm) and unused_4k_disks and not reboot and not quicktest",
@@ -232,7 +220,6 @@
232220
"nb_pools": 2,
233221
"params": {
234222
"--vm": "single/small_vm",
235-
"--sr-disk-4k": "auto",
236223
},
237224
"paths": ["tests/storage"],
238225
"markers": "unused_4k_disks",
@@ -248,7 +235,6 @@
248235
"nb_pools": 1,
249236
"params": {
250237
"--vm": "single/small_vm",
251-
"--sr-disk-4k": "auto",
252238
},
253239
"paths": ["tests/storage"],
254240
"markers": "unused_4k_disks and reboot",
@@ -261,7 +247,6 @@
261247
],
262248
"nb_pools": 1,
263249
"params": {
264-
"--sr-disk-4k": "auto",
265250
},
266251
"paths": ["tests/storage"],
267252
"markers": "unused_4k_disks and quicktest",
@@ -297,7 +282,6 @@
297282
# nb_pools left to 1 so that the job can run on XCP-ng 8.2 with just one pool, but 2 are required in 8.3+
298283
"nb_pools": 1,
299284
"params": {
300-
"--sr-disk": "auto",
301285
"--vm": "single/small_vm_efitools",
302286
},
303287
"paths": ["tests/uefi_sb/test_uefistored_cert_flow.py", "tests/uefi_sb/test_varstored_cert_flow.py"],
@@ -420,7 +404,6 @@
420404
"nb_pools": 1,
421405
"params": {
422406
"--vm": "single/small_vm",
423-
"--sr-disk": "auto",
424407
},
425408
"paths": ["tests"],
426409
"markers": "flaky",

tests/misc/test_export.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
# Requirements:
66
# From --hosts parameter:
7-
# - host: a XCP-ng host
8-
# From --sr-disk parameter:
9-
# - an additional unused disk to store the exported VM
7+
# - host: a XCP-ng host with an unused disk to store the exported VM
108
# From --vm parameter:
119
# - A VM to import and export
1210

tests/storage/iso/test_local_iso_sr.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
# Requirements:
1414
# From --hosts parameter:
15-
# - host: a XCP-ng host, with the default SR being either a shared SR, or a local SR on the master host
16-
# From --sr-disk parameter:
17-
# - an additional unused disk for the SR
15+
# - host: a XCP-ng host, with:
16+
# - the default SR being either a shared SR, or a local SR on the master host
17+
# - an additional unused disk for the SR
1818
# From --vm parameter:
1919
# - A VM to import
2020

tests/storage/iso/test_local_iso_sr_reboot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
# Requirements:
1010
# From --hosts parameter:
11-
# - host: a XCP-ng host, with the default SR being either a shared SR, or a local SR on the master host
12-
# From --sr-disk parameter:
13-
# - an additional unused disk for the SR
11+
# - host: a XCP-ng host, with:
12+
# - the default SR being either a shared SR, or a local SR on the master host
13+
# - an additional unused disk for the SR
1414
# From --vm parameter:
1515
# - A VM to import
1616

tests/uefi_sb/test_varstored_cert_flow.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
# From --hosts parameter:
1616
# - host: XCP-ng host >= 8.3
1717
# Master of a, at least, 2 hosts pool
18+
# With a free disk
1819
# - hostB1: XCP-ng host >= 8.3
1920
# This host will be joined and ejected from pool A, it means its state will be completely reinitialized from scratch
20-
# From --sr-disk parameter:
21-
# - a free disk on the first host.
2221

2322
pytestmark = pytest.mark.default_vm('mini-linux-x86_64-uefi')
2423

0 commit comments

Comments
 (0)