Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
5560d754
Commit
5560d754
authored
Mar 04, 2021
by
Francesc Guasch
Browse files
test(KVM): check CPU change
issue #1499
parent
55d958c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/request/30_hardware.t
View file @
5560d754
...
...
@@ -584,6 +584,26 @@ sub test_all_drivers($domain, $hardware) {
}
}
sub
test_change_cpus
($domain) {
my
$info
=
$domain
->
info
(
user_admin
);
my
$n_virt_cpu
=
$info
->
{
n_virt_cpu
};
for
my
$n
(
1
..
10
)
{
my
$req
=
Ravada::
Request
->
change_hardware
(
uid
=>
user_admin
->
id
,
id_domain
=>
$domain
->
id
,
hardware
=>
'
vcpus
'
,
data
=>
{
n_virt_cpu
=>
$n_virt_cpu
+
$n
}
);
wait_request
();
is
(
$req
->
status
,
'
done
');
is
(
$req
->
error
,
'');
my
$info2
=
$domain
->
info
(
user_admin
);
my
$n_virt_cpu2
=
$info2
->
{
n_virt_cpu
};
is
(
$n_virt_cpu2
,
$n_virt_cpu
+
$n
);
}
}
########################################################################
...
...
@@ -612,6 +632,9 @@ for my $vm_name ( vm_names()) {
,
disk
=>
1024
*
1024
,
create_args
(
$vm_name
)
);
test_change_cpus
(
$domain_b
);
my
%controllers
=
$domain_b
->
list_controllers
;
for
my
$hardware
(
reverse
sort
keys
%controllers
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment