Skip to content

Fix support for test-suite/squidconf directive parameter files#2458

Closed
rousskov wants to merge 3 commits into
squid-cache:masterfrom
measurement-factory:SQUID-1054-fix-parameter-files-in-squidconf-tests
Closed

Fix support for test-suite/squidconf directive parameter files#2458
rousskov wants to merge 3 commits into
squid-cache:masterfrom
measurement-factory:SQUID-1054-fix-parameter-files-in-squidconf-tests

Conversation

@rousskov

Copy link
Copy Markdown
Contributor

Those files were never found. 2022 commit d37a374 probably missed this
bug because the corresponding squid -k parse failures (quoted below)
do not result in non-zero exit status code. That failure handling
problem deserves a dedicated fix.

ERROR: Can not open file empty.conf for reading
    configuration context: ./squidconf/regressions-3.4.0.1.conf(27)

rousskov added 3 commits July 10, 2026 09:17
Those files were never found. 2022 commit d37a374 probably missed this
bug because the corresponding `squid -k parse` failures (quoted below)
do not result in non-zero exit status code. That failure handling
problem deserves a dedicated fix.

    ERROR: Can not open file empty.conf for reading
        configuration context: ./squidconf/regressions-3.4.0.1.conf(27)

----

Cherry-picked OT commit 04abbe9 and commit 39b270e changes from
SQUID-1064-make-configuration-includes-quoted-values-a-preprocessor-instruction-bag0
(a.k.a. commit 70014ef).
AFAICT, `realpath` is available on Linux, FreeBSD, and MacOS, but may
not be available (by default) on Windows,
[AIX](https://www.ibm.com/support/pages/resolving-ibm-content-navigator-310-configuration-error-aix-realpath-not-found-issue),
and in other "exotic" environments. Squid did not use that shell command
before this PR.

Our test-squid-conf.sh script normally gets `$sbindir` parameter from
Makefile, where it is provided by Automake. It my tests, it is always
absolute, so this `realpath` step is not really needed. However, AFAICT,
it is possible for `$sbindir` to be derived from a relative `$prefix`
directory (or equivalent), necessitating `realpath` conversion in those
arguably unusual cases.

We can add a portable `cd && pwd`-based `realpath` replacement but let's
keep it simple until the (currently questionable) need for handling
relative `$sbindir` values is proven.
@rousskov rousskov added M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels S-could-use-an-approval An approval may speed this PR merger (but is not required) labels Jul 10, 2026
@yadij yadij added the backport-to-v7 maintainer has approved these changes for v7 backporting label Jul 11, 2026
@squid-anubis squid-anubis added the M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels label Jul 11, 2026
@rousskov rousskov added S-waiting-for-QA QA team action is needed (and usually required) and removed S-could-use-an-approval An approval may speed this PR merger (but is not required) M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels S-waiting-for-QA QA team action is needed (and usually required) labels Jul 11, 2026
@squid-anubis squid-anubis added the M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels label Jul 12, 2026
@rousskov rousskov added the S-waiting-for-QA QA team action is needed (and usually required) label Jul 12, 2026
@squid-anubis squid-anubis removed the M-failed-other https://github.com/measurement-factory/anubis#pull-request-labels label Jul 12, 2026
@rousskov rousskov removed the S-waiting-for-QA QA team action is needed (and usually required) label Jul 12, 2026
squid-anubis pushed a commit that referenced this pull request Jul 12, 2026
Those files were never found. 2022 commit d37a374 probably missed this
bug because the corresponding `squid -k parse` failures (quoted below)
do not result in non-zero exit status code. That failure handling
problem deserves a dedicated fix.

    ERROR: Can not open file empty.conf for reading
        configuration context: ./squidconf/regressions-3.4.0.1.conf(27)
@squid-anubis squid-anubis added the M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels label Jul 12, 2026
@squid-anubis squid-anubis added M-merged https://github.com/measurement-factory/anubis#pull-request-labels and removed M-waiting-staging-checks https://github.com/measurement-factory/anubis#pull-request-labels M-cleared-for-merge https://github.com/measurement-factory/anubis#pull-request-labels labels Jul 12, 2026
@squidadm squidadm removed the backport-to-v7 maintainer has approved these changes for v7 backporting label Jul 13, 2026
@squidadm

Copy link
Copy Markdown
Collaborator

queued for backport to v7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M-merged https://github.com/measurement-factory/anubis#pull-request-labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants