]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5528: tests/testRock fails on Solaris (#2324) auto master
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 25 Dec 2025 11:28:42 +0000 (11:28 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Thu, 25 Dec 2025 11:28:53 +0000 (11:28 +0000)
commit50dfbab286077270faa7327985e4e8b094c44331
treea1b5c3cb34d27b583154a9ab59e26f9e5eeb8cd5
parentdd4a7331c91af9af988cbaf9de614ff85a33836e
Bug 5528: tests/testRock fails on Solaris (#2324)

    with stub time| FATAL: Ipc::Mem::Segment::create failed to
    shm_open(squid-0-tr_rebuild_stats.shm): (22) Invalid argument

Instance::NamePrefix() stub implementation ignored `head` and `tail`
arguments, resulting in malformed shared memory segment names on
Solaris. Other tested OSes tolerate the lack of a leading "/" character.
Linux shm_open(3) recommends "/somename" format "for portable use".

Simply adding `head` and `tail` to `NamePrefix()` result fixes tests on
Solaris but breaks tests on MacOS. We shortened the result (by removing
pid_filename hash component mimicking) to avoid that breakage and
detailed the problem in a C++ comment. More work is needed to replace
human-friendly name components with shorter hashes [on MacOS].
src/tests/stub_Instance.cc