tests: fix parallel rw disk access
The new locking behavior uncovered that unfortunate test situation: Many tests running in parallel access the same disk image with rw permissions. Luckily, none of the tests actually writes to the disk. Therefore, we can set it to readonly=true. In case this changes, the test needs to be moved to the sequential test module. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
parent
05968f5c2c
commit
d4718a9bc8
1 changed files with 22 additions and 4 deletions
|
|
@ -4445,7 +4445,7 @@ mod common_parallel {
|
|||
)
|
||||
.as_str(),
|
||||
format!("path={}", vfio_disk_path.to_str().unwrap()).as_str(),
|
||||
format!("path={},iommu=on", blk_file_path.to_str().unwrap()).as_str(),
|
||||
format!("path={},iommu=on,readonly=true", blk_file_path.to_str().unwrap()).as_str(),
|
||||
])
|
||||
.args([
|
||||
"--cmdline",
|
||||
|
|
@ -5193,7 +5193,13 @@ mod common_parallel {
|
|||
assert!(!remote_command(
|
||||
&api_socket,
|
||||
"add-disk",
|
||||
Some(format!("path={},id=test0", blk_file_path.to_str().unwrap()).as_str()),
|
||||
Some(
|
||||
format!(
|
||||
"path={},id=test0,readonly=true",
|
||||
blk_file_path.to_str().unwrap()
|
||||
)
|
||||
.as_str()
|
||||
),
|
||||
));
|
||||
});
|
||||
|
||||
|
|
@ -5255,7 +5261,13 @@ mod common_parallel {
|
|||
let (cmd_success, cmd_output) = remote_command_w_output(
|
||||
&api_socket,
|
||||
"add-disk",
|
||||
Some(format!("path={},id=test0", blk_file_path.to_str().unwrap()).as_str()),
|
||||
Some(
|
||||
format!(
|
||||
"path={},id=test0,readonly=true",
|
||||
blk_file_path.to_str().unwrap()
|
||||
)
|
||||
.as_str(),
|
||||
),
|
||||
);
|
||||
assert!(cmd_success);
|
||||
assert!(String::from_utf8_lossy(&cmd_output)
|
||||
|
|
@ -5296,7 +5308,13 @@ mod common_parallel {
|
|||
let (cmd_success, cmd_output) = remote_command_w_output(
|
||||
&api_socket,
|
||||
"add-disk",
|
||||
Some(format!("path={},id=test0", blk_file_path.to_str().unwrap()).as_str()),
|
||||
Some(
|
||||
format!(
|
||||
"path={},id=test0,readonly=true",
|
||||
blk_file_path.to_str().unwrap()
|
||||
)
|
||||
.as_str(),
|
||||
),
|
||||
);
|
||||
assert!(cmd_success);
|
||||
assert!(String::from_utf8_lossy(&cmd_output)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue