Skip to content

Fix parsing of MINITEST value in minutes - #544

Merged
dl1jbe merged 2 commits into
Tlf:masterfrom
zcsahok:fix_minitest_minutes
Oct 25, 2026
Merged

dl1jbe merged 2 commits into
Tlf:masterfrom
zcsahok:fix_minitest_minutes

Conversation

@zcsahok

@zcsahok zcsahok commented Oct 19, 2026

Copy link
Copy Markdown
Member

In the previous PR #540, I missed that trailing newline characters aren't stripped from the argument. As a result, the MIN suffix isn't removed correctly, causing a parsing error.

First adding trailing NL to test_minitest_10min to reproduce the issue.

@zcsahok

zcsahok commented Oct 19, 2026 •

Copy link
Copy Markdown
Member Author

The fix: trimming value before parsing.

@dl1jbe

dl1jbe commented Oct 25, 2026

Copy link
Copy Markdown
Member

Fine. Merging it in.

@dl1jbe
dl1jbe merged commit 6fec1cf into Tlf:master Oct 25, 2026
2 checks passed
@dl1jbe

dl1jbe commented Oct 25, 2026

Copy link
Copy Markdown
Member

So test failed. Will check and fix tomorrow.

@zcsahok

zcsahok commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

There is a ongoing migration to Ubuntu 26 and this failed job ran on it. In my repo it was today still Ubuntu 24 and it was OK. There must be some change to astyle in 26.

@dl1jbe

dl1jbe commented Oct 26, 2026

Copy link
Copy Markdown
Member

Yes, newer astyle versions differs in indentation of some code snippets.
Just tested with version 3.6.7 and 3.6.18
3.6.7 wants changes in src/parse_logcfg.c
3.6.18 instead wants to change cabrillo_utils.c, plugins.c, getexchange.c

@dl1jbe

dl1jbe commented Oct 26, 2026

Copy link
Copy Markdown
Member

Astyle gets fooled when more than one struct member gets assigned per line.

int rc = cfg_string((cfg_arg_t) {
    .char_p = my.call, .size = sizeof(my.call),
    .strip = true, .string_type = STATIC
});

gets converted into

int rc = cfg_string((cfg_arg_t) {
    .char_p = my.call, .size = sizeof(my.call),
                       .strip = true, .string_type = STATIC
});

So either wrap by INDENT-OFF INDENT-ON or have .char_p and .size assignment on two separate lines.

Btw, the problem seems to be fixed in newer astyle versions.

@zcsahok

zcsahok commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

OK, I see. It looks like only two places in parse_logcfg.c are affected. I’ll submit a PR to fix them.

dl1jbe pushed a commit that referenced this pull request Oct 26, 2026
putting struct member definitions on separate lines
Fixes 'astyle' prblom from PR #544
@zcsahok
zcsahok deleted the fix_minitest_minutes branch October 27, 2026 16:59
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