parsedate: clarify time2epoch and add more variations to test 517#21251
parsedate: clarify time2epoch and add more variations to test 517#21251
Conversation
|
Analysis of PR #21251 at 64b113e1: Test 1093 failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 5 different CI jobs (the link just goes to one of them). Generated by Testclutch |
There was a problem hiding this comment.
Pull request overview
Refactors time2epoch() in parsedate.c for readability and expands curl_getdate() coverage in test 517 with additional input variations and edge cases.
Changes:
- Refactor
time2epoch()by extracting leap-day baseline and simplifying the day/seconds computation. - Add many additional
curl_getdate()test vectors (format variations, timezones, malformed inputs, boundary years). - Update
.clang-tidy.ymlby removingreadability-math-missing-parentheses.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
tests/libtest/lib517.c |
Adds new curl_getdate() parsing test cases (formats, invalid dates, TZ offsets, boundaries). |
lib/parsedate.c |
Makes time2epoch() more readable by splitting computations and naming constants. |
.clang-tidy.yml |
Removes one clang-tidy readability check from the enabled checks list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
It's mostly annoying and not helpful
Polish the time2epoch function to become a little more readable. Add a few more curl_getdate() input varations to test 517
|
augment review |
🤖 Augment PR SummarySummary: This PR refactors the Changes:
🤖 Was this summary useful? React with 👍 or 👎 |
test then all
Polish the time2epoch function to become a little more readable.
Add a few more curl_getdate() input varations to test 517