Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not check for ID in the device name #23

Open
wants to merge 2 commits into
base: staging.kernelci.org
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions boards/google,kevin
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,16 @@ assert_driver_present cros-ec-rtc-driver-present cros-ec-rtc
assert_device_present cros-ec-rtc-probed cros-ec-rtc cros-ec-rtc.*

assert_driver_present cros-ec-sensors-driver-present cros-ec-sensors
if kernel_greater_than "5.5"; then
assert_device_present cros-ec-sensors-accel0-probed cros-ec-sensors cros-ec-accel.11.*
assert_device_present cros-ec-sensors-accel1-probed cros-ec-sensors cros-ec-accel.13.*
assert_device_present cros-ec-sensors-gyro0-probed cros-ec-sensors cros-ec-gyro.12.*

if kernel_greater_than "5.5"; then
assert_driver_present cros-ec-sensorhub-driver-present cros-ec-sensorhub
assert_device_present cros-ec-sensorhub-probed cros-ec-sensorhub cros-ec-sensorhub.1.*
else
assert_device_present cros-ec-sensors-accel0-probed cros-ec-sensors cros-ec-accel.0
assert_device_present cros-ec-sensors-accel1-probed cros-ec-sensors cros-ec-accel.1
assert_device_present cros-ec-sensors-gyro0-probed cros-ec-sensors cros-ec-gyro.0
assert_device_present cros-ec-sensorhub-probed cros-ec-sensorhub cros-ec-sensorhub.*
fi

assert_device_present cros-ec-sensors-accel0-probed cros-ec-sensors cros-ec-accel.*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with this is that there are multiple (2) files that will match the cros-ec-accel.* glob. So assert_device_present will see each of them as a different parameter. The first will be used as it's supposed to, but the second will be passed to the timeout command, which I think will cause an error. So the * globbing can only be used in the bootrr commands when it matches a single file (which is why I couldn't have #40 be a single check).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nfraprado @crazoes

How about fixing that in assert_device_present? Example: r-c-n@50a07b2

I guess this can be extended to other helpers.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hardboprobot sounds sensible to me, the only thing I'm not sure about is requiring bash instead of sh. But if you could create a PR we can discuss/test it further there.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh I didn't get a notification for this, sorry. PR: #41

assert_device_present cros-ec-sensors-accel1-probed cros-ec-sensors cros-ec-accel.*
assert_device_present cros-ec-sensors-gyro0-probed cros-ec-sensors cros-ec-gyro.*

assert_driver_present cros-ec-sysfs-driver-present cros-ec-sysfs
assert_device_present cros-ec-sysfs-probed cros-ec-sysfs cros-ec-sysfs.*
assert_sysfs_attr_present cros-ec-sysfs-attr-flashinfo /sys/class/chromeos/cros_ec/flashinfo
Expand Down Expand Up @@ -79,7 +76,8 @@ assert_device_present rockchip-emmc-phy-probed rockchip-emmc-phy ff770000.*

assert_driver_present rockchip-i2s-driver-present rockchip-i2s
assert_device_present rockchip-i2s0-probed rockchip-i2s ff880000.*
assert_device_present rockchip-i2s1-probed rockchip-i2s ff8a0000.*

assert_device_present rockchip-spdif1-probed rockchip-spdif ff870000.*

assert_driver_present rockchip-iodomain-driver-present rockchip-iodomain
assert_device_present rockchip-iodomain0-probed rockchip-iodomain ff320000.*
Expand Down