This is an automated email from the ASF dual-hosted git repository.
sureshanaparti pushed a commit to branch 4.19
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push:
new ded7b4dbe5a test: fix test failure on ubuntu 24.04: "top: unknown
option 'n'" (#9262)
ded7b4dbe5a is described below
commit ded7b4dbe5a93baecad719fd6727698691456188
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Jun 21 07:16:06 2024 +0200
test: fix test failure on ubuntu 24.04: "top: unknown option 'n'" (#9262)
---
test/integration/smoke/test_service_offerings.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/integration/smoke/test_service_offerings.py
b/test/integration/smoke/test_service_offerings.py
index 62e39e195c2..c6a14a64471 100644
--- a/test/integration/smoke/test_service_offerings.py
+++ b/test/integration/smoke/test_service_offerings.py
@@ -1043,7 +1043,7 @@ class TestCpuCapServiceOfferings(cloudstackTestCase):
#Get host CPU usage from top command before and after VM consuming
100% CPU
find_pid_cmd = "ps -ax | grep '%s' | head -1 | awk '{print $1}'" %
self.vm.id
pid = ssh_host.execute(find_pid_cmd)[0]
- cpu_usage_cmd = "top -b n 1 p %s | tail -1 | awk '{print $9}'" % pid
+ cpu_usage_cmd = "top -b -n 1 -p %s | tail -1 | awk '{print $9}'" % pid
host_cpu_usage_before_str = ssh_host.execute(cpu_usage_cmd)[0]
host_cpu_usage_before = round(float(host_cpu_usage_before_str))