Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions tests/drivers/counter/counter_basic_api/src/test_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ static void test_single_shot_alarm_instance(const struct device *dev, bool set_t
err = counter_set_top_value(dev, &top_cfg);

zassert_equal(0, err,
"%s: Counter failed to set top value", dev->name);
"%s: Counter failed to set top value (err: %d)", dev->name, err);

cntr_alarm_cfg.ticks = ticks + 1;
err = counter_set_channel_alarm(dev, 0, &cntr_alarm_cfg);
Expand Down Expand Up @@ -601,7 +601,8 @@ static void test_multiple_alarms_instance(const struct device *dev)

if (set_top_value_capable(dev)) {
err = counter_set_top_value(dev, &top_cfg);
zassert_equal(0, err, "%s: Counter failed to set top value", dev->name);
zassert_equal(0, err, "%s: Counter failed to set top value (err: %d)", dev->name,
err);
} else {
/* Counter does not support top value, do not run this test
* as it might take a long time to wrap and trigger the alarm
Expand Down
4 changes: 2 additions & 2 deletions tests/drivers/counter/maxim_ds3231_api/src/test_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void test_single_shot_alarm_instance(const struct device *dev, bool set_top)
err = counter_set_top_value(dev, &top_cfg);

zassert_equal(0, err,
"%s: Counter failed to set top value", dev->name);
"%s: Counter failed to set top value (err: %d)", dev->name, err);

alarm_cfg.ticks = ticks + 1;
err = counter_set_channel_alarm(dev, 0, &alarm_cfg);
Expand Down Expand Up @@ -398,7 +398,7 @@ void test_multiple_alarms_instance(const struct device *dev)

err = counter_set_top_value(dev, &top_cfg);
zassert_equal(-ENOTSUP, err,
"%s: Counter failed to set top value: %d", dev->name);
"%s: Counter failed to set top value (err: %d)", dev->name, err);
Copy link
Contributor

@JarmouniA JarmouniA Oct 21, 2025

Choose a reason for hiding this comment

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

Only this change is a fix, the others are rather enhancements, should go in a separate commit.

https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#pr-requirements
"Distinct, Logical Units of Change
(...)For example, adding a feature, fixing a bug, or refactoring existing code should be separate commits"

Copy link
Member

Choose a reason for hiding this comment

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

I don't want two commits for such related change really


k_sleep(K_USEC(3 * (uint32_t)counter_ticks_to_us(dev, alarm_cfg.ticks)));

Expand Down