fix (socat): skip VSOCK_ECHO test (410) in %check and export SHELL env variable in %check#15998
Conversation
Test 410 (VSOCK_ECHO) fails in mock/Koji because /dev/vsock is not available — VSOCK requires a hypervisor with vhost_vsock loaded, which is not present in build chroots. Add a spec-search-replace overlay to append test 410 to the existing NUMCOND exclusion list (alongside 146, 478, 528). Move socat from inline entry in components-full.toml to a dedicated comp.toml. Validated: build succeeds, 0 test failures (589 selected, 304 ok), smoke-tested socat -V in mock chroot.
There was a problem hiding this comment.
Pull request overview
This PR fixes a test failure in the socat package by excluding the VSOCK_ECHO test (410), which fails in mock/Koji build environments where /dev/vsock is unavailable. The fix applies a spec file modification to skip this test alongside other already-excluded tests.
Changes:
- Added overlay configuration to exclude test 410 in the
%checksection - Moved
socatfrom inline declaration to dedicated component file
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| base/comps/socat/socat.comp.toml | New component file with spec-search-replace overlay to exclude VSOCK_ECHO test 410 |
| base/comps/components-full.toml | Removed inline socat component declaration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description = "Export SHELL env var — socat SHELL address type requires it but mock chroot does not set it" | ||
| type = "spec-prepend-lines" | ||
| section = "%check" | ||
| lines = ["export SHELL=/bin/bash"] |
There was a problem hiding this comment.
I updated a mock build spec file like:
%check
echo $SHELL
exit 1
and it resulted in:
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.OOpbK3
- umask 022
(...setting lots of *FLAG env vars...)- cd /builddir/build/BUILD/socat-1.8.0.3-build
- LT_SYS_LIBRARY_PATH=/usr/lib64:
- export LT_SYS_LIBRARY_PATH
- CC=gcc
- export CC
- CXX=g++
- export CXX
- cd socat-1.8.0.3
- echo /bin/bash
/bin/bash- exit 1
so it looks like $SHELL is already defined inside %check, i'm confused about why this is needed?
There was a problem hiding this comment.
to clarify, i'm fine with checking this in, but it seems like it's actually a bug in our koji build environment, and i think we should mark it as a workaround so we can go back and dig deeper when we have time. if there is something i'm missing that would indicate this isn't a workaround please add the detail here, otherwise please mark this commit as a workaround (e.g. with 'workaround' in the commit subject) and i'm good to merge it after that
There was a problem hiding this comment.
I updated a mock build spec file like:
%check echo $SHELL exit 1so it looks like $SHELL is already defined inside
%check, i'm confused about why this is needed?
Is this in local build or Koji build? I didn't hit SHELL variable undefined error in local build where SHELL is set, only see it undefined in Koji build. I'll check if there's a different mock config in koji builder. will also mark it as a workaround.
socat's SHELL address type requires the SHELL env var, which is not set in the Koji mock chroot. This caused 14 test failures (495-502, 506, 508, 587, 590-593) with 'SHELL variable undefined'
31edb35 to
9234a47
Compare
This PR:
spec-search-replaceoverlay to append test 410 to the existing NUMCOND exclusion list (alongside 146, 478, 528).%checksection to fix theSHELL variable undefinederror that caused 14 test failures (495-502, 506, 508, 587, 590-593).This error only happens in Koji build.
Mock's built-in Python defaults (config.py) do set
SHELL=/bin/bashandazurelinux-4.0.tpldoes not overrideconfig_opts['environment']. We will check inside the Koji builders to see if there's any overrides.socatfrom inline entry incomponents-full.tomlto a dedicated comp.toml.Validation:
azldev comp build -p socat, 0 test failures (589 selected, 304 ok)