{
struct udevice *dev, *cmp;
- ut_assertok(button_get_by_label("summer", &dev));
+ ut_assertok(button_get_by_label("button1", &dev));
ut_asserteq(1, device_active(dev));
ut_assertok(uclass_get_device(UCLASS_BUTTON, 1, &cmp));
ut_asserteq_ptr(dev, cmp);
- ut_assertok(button_get_by_label("christmas", &dev));
+ ut_assertok(button_get_by_label("button2", &dev));
ut_asserteq(1, device_active(dev));
ut_assertok(uclass_get_device(UCLASS_BUTTON, 2, &cmp));
ut_asserteq_ptr(dev, cmp);
- ut_asserteq(-ENODEV, button_get_by_label("spring", &dev));
+ ut_asserteq(-ENODEV, button_get_by_label("nobutton", &dev));
return 0;
}
expected_response = 'rc:0'
response = u_boot_console.run_command('button list; echo rc:$?')
assert(expected_response in response)
- response = u_boot_console.run_command('button summer; echo rc:$?')
+ response = u_boot_console.run_command('button button1; echo rc:$?')
assert(expected_response in response)
expected_response = 'rc:1'