Skip to content

Fix HOSTS file rotation test which was hiding in fast runners#2630

Merged
DL6ER merged 1 commit into
developmentfrom
fix/file_rotation
Sep 15, 2025
Merged

Fix HOSTS file rotation test which was hiding in fast runners#2630
DL6ER merged 1 commit into
developmentfrom
fix/file_rotation

Conversation

@yubiuser

Copy link
Copy Markdown
Member

What does this PR aim to accomplish?:

Fixes a regression of #2624, which was hiding in fast runners. See
#2624 (comment)


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)
  6. I have checked that another pull request for this purpose does not exist.
  7. I have considered, and confirmed that this submission will be valuable to others.
  8. I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  9. I give this submission freely, and claim no ownership to its content.

  • I have read the above and my PR is ready for review. Check this box to confirm

Signed-off-by: yubiuser <github@yubiuser.dev>
@yubiuser yubiuser requested a review from a team as a code owner September 15, 2025 10:16
@DL6ER

DL6ER commented Sep 15, 2025

Copy link
Copy Markdown
Member

This is, of course, a band-aid fix for the symptoms, it is not fixing the root cause behind this. I'm aware that there is at least one (probably several) similar places in the tests. Maybe we need some sort of

pihole-FTL check-logs-for "some text here"

which scans FTL.log for exactly this text, probably with some timeout to not wait longer than, say five, seconds. This would then ensure we are not adding sleeps across the tests making them needlessly slow over time.

But I am fully open for better ideas!

@DL6ER DL6ER merged commit 9f087cf into development Sep 15, 2025
17 checks passed
@DL6ER DL6ER deleted the fix/file_rotation branch September 15, 2025 17:18
@yubiuser

Copy link
Copy Markdown
Member Author

This is, of course, a band-aid fix for the symptoms, it is not fixing the root cause behind this.

Is it? The issue is that we execute a process which returns fast but does some stuff in the background and the test run so fast that checking the background stuff a few seconds later will fails because the first process is not done yet.
We need a delay somewhere and I don't think it matters if we add this delay explicitly in the test suite or hide it in some `FTL´ command. Also the amount of sleep time we have in the tests is minimal compared to the overall CI length (2-4 min, > 20 min for RISC). We could probably discuss if I put the sleep at the right place - maybe it would be better placed right before checking the config log rotation.

@DL6ER

DL6ER commented Sep 15, 2025

Copy link
Copy Markdown
Member

I did just push something to the branch wait-for-string

@PromoFaux PromoFaux mentioned this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants