Merge ~liaou3/checkbox-iiotg/+git/checkbox-provider-intliotg:fix_cpuinfo_resource into ~checkbox-dev/checkbox-iiotg/+git/checkbox-provider-intliotg:master

Proposed by Vincent Liao
Status: Merged
Approved by: Vincent Liao
Approved revision: eb65f7b1b4998821742e850ad9063010034a4669
Merged at revision: caa5b3de3db4f630b4dc24bb970e8118e6612217
Proposed branch: ~liaou3/checkbox-iiotg/+git/checkbox-provider-intliotg:fix_cpuinfo_resource
Merge into: ~checkbox-dev/checkbox-iiotg/+git/checkbox-provider-intliotg:master
Diff against target: 22 lines (+2/-2)
1 file modified
units/power-management-cpu-cstate/jobs.pxu (+2/-2)
Reviewer Review Type Date Requested Status
StanleyHuang Approve
Patrick Liu (community) Approve
Rick Wu Pending
PeiYao Chang Pending
Vic Liu Pending
Review via email: mp+453621@code.launchpad.net

Commit message

Fix: Correct the path for cpuinfo_resource.py

Description of the change

This job use the cpuinfo_resource.py from checkbox ppc but didn't specify the path. This MR specify the path run it.
Submission: https://certification.canonical.com/hardware/202305-31589/submission/337419/

To post a comment you must log in.
Revision history for this message
Patrick Liu (patliu) wrote :

Hi Vicent,

From the submission you provided, the "cpuinfo" resource job can be executed successfully.
The cpuinfo job uses cpuinfo_resources.py as well.

id: cpuinfo
estimated_duration: 0.37
plugin: resource
user: root
command: cpuinfo_resource.py
_summary: Collect information about the CPU
_description: Gets CPU resource info from /proc/cpuinfo

So I'm wondering why we need to specify the whole path in this job.

review: Needs Information
Revision history for this message
Vincent Liao (liaou3) wrote :

> Hi Vicent,
>
> From the submission you provided, the "cpuinfo" resource job can be executed
> successfully.
> The cpuinfo job uses cpuinfo_resources.py as well.
>
> id: cpuinfo
> estimated_duration: 0.37
> plugin: resource
> user: root
> command: cpuinfo_resource.py
> _summary: Collect information about the CPU
> _description: Gets CPU resource info from /proc/cpuinfo
>
> So I'm wondering why we need to specify the whole path in this job.

Because in the iiotg job `power-management-cpu-cstate/cpu-low-power-idle`, we will call the `cpuinfo_resource.py` from checkbox ppc provider which is not in the current checkbox-provider-iiotg. That's why we need to specify the path.

Revision history for this message
Patrick Liu (patliu) wrote :

LGTM

review: Approve
Revision history for this message
StanleyHuang (stanley31) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/power-management-cpu-cstate/jobs.pxu b/units/power-management-cpu-cstate/jobs.pxu
2index b7c0672..88a6d1e 100644
3--- a/units/power-management-cpu-cstate/jobs.pxu
4+++ b/units/power-management-cpu-cstate/jobs.pxu
5@@ -50,7 +50,7 @@ requires:
6 sleep.mem_sleep == 's2idle'
7 flags: also-after-suspend
8 command:
9- cpu_lpi_file=$(cpuinfo_resource.py | grep cpu_lpi_file | awk '{ print $2 }')
10+ cpu_lpi_file=$("$CHECKBOX_RUNTIME"/providers/checkbox-provider-resource/bin/cpuinfo_resource.py | grep cpu_lpi_file | awk '{ print $2 }')
11 if [ "$cpu_lpi_file" == "low_power_idle_cpu_residency_us" ]; then
12 before=$(cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us)
13 screenoff.sh 20
14@@ -90,7 +90,7 @@ requires:
15 cpuinfo.sys_lpi_file in ('low_power_idle_system_residency_us', 'slp_s0_residency_usec')
16 sleep.mem_sleep == 's2idle'
17 command:
18- sys_lpi_file=$(cpuinfo_resource.py | grep sys_lpi_file | awk '{ print $2 }')
19+ sys_lpi_file=$("$CHECKBOX_RUNTIME"/providers/checkbox-provider-resource/bin/cpuinfo_resource.py | grep sys_lpi_file | awk '{ print $2 }')
20 echo "mem_sleep: $(cat /sys/power/mem_sleep)"
21 dmesg | grep ACPI | grep supports | sed 's/\[.*ACPI/ACPI/'
22 echo "Content of /etc/default/grub:"

Subscribers

People subscribed via source and target branches