app/test: enhance power manager unit tests
PATCH 1/1 app/test: enhance power manager unit tests
Unit Testcases are added for power_acpi_cpu_freq,power_kvm_vm_test to improve coverage
--- test/test/test_power_acpi_cpufreq.c | 2 +- test/test/test_power_kvm_vm.c | 62 +++++++++++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 7 deletions(-)
test/test/test_power_acpi_cpufreq.c +1 -1
@@ -27,7 +27,7 @@#define TEST_POWER_FREQS_NUM_MAX ((unsigned)RTE_MAX_LCORE_FREQS)#define TEST_POWER_SYSFILE_CUR_FREQ \ - "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq" + "/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq"static uint32_t total_freq_num;static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX ];
test/test/test_power_kvm_vm.c +56 -6
96 lines not on this page · raw message
Signature · 1 line
1.7.12.2
PATCH v2 1/1 app/test: enhance power manager unit tests
Unit Testcases are added for power_acpi_cpu_freq,power_kvm_vm_test to improve coverage
---
V3: removed unnecessary extern funtion prototypes.
--- test/test/test_power_acpi_cpufreq.c | 2 +- test/test/test_power_kvm_vm.c | 60 +++++++++++++++++++++++++++++++++---- 2 files changed, 55 insertions(+), 7 deletions(-)
test/test/test_power_acpi_cpufreq.c +1 -1
@@ -27,7 +27,7 @@#define TEST_POWER_FREQS_NUM_MAX ((unsigned)RTE_MAX_LCORE_FREQS)#define TEST_POWER_SYSFILE_CUR_FREQ \ - "/sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq" + "/sys/devices/system/cpu/cpu%u/cpufreq/cpuinfo_cur_freq"static uint32_t total_freq_num;static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX ];
test/test/test_power_kvm_vm.c +54 -6
94 lines not on this page · raw message
Signature · 1 line
1.7.12.2
Thomas Monjalon
Applied11/04/2018 16:14, Reshma Pattan:
Quoted 5 lines
Unit Testcases are added for
power_acpi_cpu_freq,power_kvm_vm_testto improve coverageSigned-off-by Jananee Parthasarathy <[email protected]>Acked-by David Hunt <[email protected]>
Applied, thanks
Quoted 9 lines · Thomas Monjalon
11/04/2018 16:14, Reshma Pattan:
Quoted 5 lines
Unit Testcases are added for
power_acpi_cpu_freq,power_kvm_vm_testto improve coverageSigned-off-by Jananee Parthasarathy <[email protected]>Acked-by David Hunt <[email protected]>Applied, thanks
Sadly, this patch seems to break shared library builds. If you try doing "make test-build" with shared libraries on it will fail, or if you do a meson build using shared libraries you will get the same result.
The root cause is that the function guest_channel_host_connect() is a private function and so is not listed in the shared library map file, preventing the test app from linking.
Regards,
/Bruce
Hi,
Quoted 21 lines
-----Original Message-----
From: Richardson, Bruce
Sent: Tuesday, April 24, 2018 11:59 AM
To: Thomas Monjalon <[email protected]>
Cc: Parthasarathy, JananeeX M <[email protected]>; [email protected]; Pattan, Reshma <[email protected]>; Hunt, David <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/test: enhance power manager unit testsQuoted 10 lines · Thomas Monjalon
11/04/2018 16:14, Reshma Pattan:
Quoted 6 lines
Unit Testcases are added for
power_acpi_cpu_freq,power_kvm_vm_testto improve coverageSigned-off-by: Jananee Parthasarathy
<[email protected]>Acked-by David Hunt <[email protected]>Applied, thanks
Quoted 8 lines
Sadly, this patch seems to break shared library builds. If you try doing "make test-build" with shared libraries on it will fail, or if you do a meson build using shared libraries you will get the same result.
The root cause is that the function
guest_channel_host_connect()is a private function and so is not listed in the shared library map file, preventing the test app from linking.
Any action from my side required? Let me know.
Quoted 2 lines
Regards,
/Bruce
Quoted 26 lines · Reshma
Hi,
Quoted 24 lines
-----Original Message-----
From: Richardson, Bruce
Sent: Tuesday, April 24, 2018 11:59 AM
To: Thomas Monjalon <[email protected]>
Cc: Parthasarathy, JananeeX M <[email protected]>; [email protected]; Pattan, Reshma <[email protected]>; Hunt, David <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/test: enhance power manager unit testsQuoted 9 lines · Thomas Monjalon
11/04/2018 16:14, Reshma Pattan:
Quoted 6 lines
Unit Testcases are added for
power_acpi_cpu_freq,power_kvm_vm_testto improve coverageSigned-off-by: Jananee Parthasarathy
<[email protected]>Acked-by David Hunt <[email protected]>Applied, thanks
Sadly, this patch seems to break shared library builds. If you try doing "make test-build" with shared libraries on it will fail, or if you do a meson build using shared libraries you will get the same result.
Quoted 5 lines
Quoted 4 lines
The root cause is that the function
guest_channel_host_connect()is a private function and so is not listed in the shared library map file, preventing the test app from linking.Any action from my side required? Let me know.
Reshma,
Looking at this, I think this particular unit test needs to be removed. The way it is at the moment, it's "faking" the connect, then any commands that are sent to the dummy host are only really to test to see if the API breaks, which is going to be captured by compilation tests anyway. I don't see the value of this unit test unless you have the full host setup underneath is, in which case it's no longer a unit test. Also, we don't want to make these functions public, as they are only of use to the library internally, and there is no use for them publicly (unless a guest wants to fake a connection to a non-existent host).
What do you think?
Dave.
Hi,
Quoted 56 lines
-----Original Message-----
From: Hunt, David
Sent: Tuesday, April 24, 2018 1:10 PM
To: Pattan, Reshma <[email protected]>; Richardson, Bruce <[email protected]>; Thomas Monjalon <[email protected]>
Cc: Parthasarathy, JananeeX M <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH v2] app/test: enhance power manager unit testsQuoted 15 lines · Reshma
Hi,
Quoted 13 lines
-----Original Message-----
From: Richardson, Bruce
Sent: Tuesday, April 24, 2018 11:59 AM
To: Thomas Monjalon <[email protected]>
Cc: Parthasarathy, JananeeX M <[email protected]>; [email protected]; Pattan, Reshma <[email protected]>; Hunt, David <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/test: enhance power manager unit testsQuoted 2 lines · Thomas Monjalon
11/04/2018 16:14, Reshma Pattan:
Quoted 1 line
Unit Testcases are added for
power_acpi_cpu_freq,
power_kvm_vm_testQuoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 5 lines
to improve coverage
Signed-off-by: Jananee Parthasarathy
<[email protected]>Acked-by David Hunt <[email protected]>Applied, thanks
Sadly, this patch seems to break shared library builds. If you try doing "make test-build" with shared libraries on it will fail, or if you do a meson build using shared libraries you will get the same result.
Quoted 5 lines
Quoted 4 lines
The root cause is that the function
guest_channel_host_connect()is a private function and so is not listed in the shared library map file, preventing the test app from linking.Any action from my side required? Let me know.
Reshma,
Looking at this, I think this particular unit test needs to be removed. The
way it is at the moment, it's "faking" the connect, then any commands that are sent to the dummy host are only really to test to see if the API breaks, which is going to be captured by compilation tests anyway. I don't see the value of this unit test unless you have the full host setup underneath is, in which case it's no longer a unit test.
Also, we don't want to make these functions public, as they are only of use to the library internally, and there is no use for them publicly (unless a guest wants to fake a connection to a non-existent host).
Quoted 1 line
What do you think?
Fine, we are reverting the changes and will send the patch soon.
Thanks,
Reshma
24/04/2018 14:51, Pattan, Reshma:
Quoted 35 lines
From: Hunt, David
Quoted 34 lines · Reshma
Quoted 4 lines
From: Richardson, Bruce
Quoted 3 lines · Thomas Monjalon
Quoted 2 lines
11/04/2018 16:14, Reshma Pattan:
Quoted 1 line
Unit Testcases are added for
power_acpi_cpu_freq,
power_kvm_vm_testQuoted 11 lines
Quoted 11 lines
Quoted 7 lines
Quoted 5 lines
to improve coverage
Signed-off-by: Jananee Parthasarathy
<[email protected]>Acked-by David Hunt <[email protected]>Applied, thanks
Sadly, this patch seems to break shared library builds. If you try doing "make test-build" with shared libraries on it will fail, or if you do a meson build using shared libraries you will get the same result.
Quoted 5 lines
Quoted 4 lines
The root cause is that the function
guest_channel_host_connect()is a private function and so is not listed in the shared library map file, preventing the test app from linking.Any action from my side required? Let me know.
Reshma,
Looking at this, I think this particular unit test needs to be removed. The
way it is at the moment, it's "faking" the connect, then any commands that are sent to the dummy host are only really to test to see if the API breaks, which is going to be captured by compilation tests anyway. I don't see the value of this unit test unless you have the full host setup underneath is, in which case it's no longer a unit test.
Also, we don't want to make these functions public, as they are only of use to the library internally, and there is no use for them publicly (unless a guest wants to fake a connection to a non-existent host).
Quoted 3 lines
Quoted 1 line
What do you think?
Fine, we are reverting the changes and will send the patch soon.
Where is the patch?
I will revert it myself.
Hi Thomas,
I sent it few mins back. Can you check and apply
Thanks,
Reshma
Quoted 55 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 24, 2018 11:34 PM
To: Pattan, Reshma <[email protected]>
Cc: [email protected]; Hunt, David <[email protected]>; Richardson, Bruce <[email protected]>; Parthasarathy, JananeeX M <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] app/test: enhance power manager unit tests24/04/2018 14:51, Pattan, Reshma:
Quoted 17 lines
From: Hunt, David
Quoted 16 lines · Reshma
Quoted 4 lines
From: Richardson, Bruce
Quoted 3 lines · Thomas Monjalon
Quoted 2 lines
11/04/2018 16:14, Reshma Pattan:
Quoted 1 line
Unit Testcases are added for
power_acpi_cpu_freq,
power_kvm_vm_testQuoted 10 lines
Quoted 10 lines
Quoted 7 lines
Quoted 5 lines
to improve coverage
Signed-off-by: Jananee Parthasarathy
<[email protected]>Acked-by David Hunt <[email protected]>Applied, thanks
Sadly, this patch seems to break shared library builds. If you try doing "make test-build" with shared libraries on it will fail, or if you do a meson build using shared libraries you will get the
same result.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
The root cause is that the function
guest_channel_host_connect()is a private function and so is not listed in the shared library map file, preventing the test app from linking.Any action from my side required? Let me know.
Quoted 7 lines
Quoted 7 lines
Reshma,
Looking at this, I think this particular unit test needs to be
removed. The way it is at the moment, it's "faking" the connect, then any commands that are sent to the dummy host are only really to test to see if the API breaks, which is going to be captured by compilation tests anyway. I don't see the value of this unit test unless you have the full host setup underneath is, in which case it's nolonger a unit test.
Quoted 7 lines
Quoted 5 lines
Also, we don't want to make these functions public, as they are only of use to the library internally, and there is no use for them publicly (unless a guest wants to fake a connection to a non-existent host).
What do you think?
Fine, we are reverting the changes and will send the patch soon.
Where is the patch?
I will revert it myself.