Skip to content

Commit 23f76cd

Browse files
committed
quicktest: Make default virtual size less magical
4194304 = 4MIB Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
1 parent 34f0081 commit 23f76cd

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

ocaml/quicktest/qt.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ module VDI = struct
192192

193193
let test_vdi_name_description = "VDI for storage quicktest"
194194

195-
let make rpc session_id ?(virtual_size = 4194304L) ?backing_format sR =
195+
let make rpc session_id ?(virtual_size = Int64.(mul (mul 4L 1024L) 1024L))
196+
?backing_format sR =
196197
let sm_config =
197198
match backing_format with Some x -> [("image-format", x)] | None -> []
198199
in
@@ -207,7 +208,8 @@ module VDI = struct
207208
Client.Client.VDI.destroy ~rpc ~session_id ~self
208209
)
209210

210-
let with_new rpc session_id ?(virtual_size = 4194304L) ?backing_format sr f =
211+
let with_new rpc session_id ?(virtual_size = Int64.(mul (mul 4L 1024L) 1024L))
212+
?backing_format sr f =
211213
let self = make rpc session_id ~virtual_size ?backing_format sr in
212214
with_destroyed rpc session_id self (fun () -> f self)
213215

ocaml/quicktest/quicktest_vm_snapshot.ml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ let with_setup rpc session_id sr vm_template f =
55
print_endline (Printf.sprintf "Template has uuid: %s%!" uuid) ;
66
let vdi =
77
Client.Client.VDI.create ~rpc ~session_id ~name_label:"small"
8-
~name_description:__LOC__ ~sR:sr ~virtual_size:4194304L ~_type:`user
9-
~sharable:false ~read_only:false ~other_config:[] ~xenstore_data:[]
10-
~sm_config:[] ~tags:[]
8+
~name_description:__LOC__ ~sR:sr
9+
~virtual_size:Int64.(mul (mul 4L 1024L) 1024L)
10+
~_type:`user ~sharable:false ~read_only:false ~other_config:[]
11+
~xenstore_data:[] ~sm_config:[] ~tags:[]
1112
in
1213
let vdi2 =
1314
Client.Client.VDI.create ~rpc ~session_id ~name_label:"small2"
14-
~name_description:__LOC__ ~sR:sr ~virtual_size:4194304L ~_type:`user
15-
~sharable:false ~read_only:false ~other_config:[] ~xenstore_data:[]
16-
~sm_config:[] ~tags:[]
15+
~name_description:__LOC__ ~sR:sr
16+
~virtual_size:Int64.(mul (mul 4L 1024L) 1024L)
17+
~_type:`user ~sharable:false ~read_only:false ~other_config:[]
18+
~xenstore_data:[] ~sm_config:[] ~tags:[]
1719
in
1820
Qt.VM.with_new rpc session_id ~template:vm_template (fun vm ->
1921
print_endline (Printf.sprintf "Installed new VM") ;

0 commit comments

Comments
 (0)