Skip to content

fix (socat): skip VSOCK_ECHO test (410) in %check and export SHELL env variable in %check#15998

Merged
ddstreetmicrosoft merged 2 commits intotomls/base/mainfrom
liunan/socat_toml
Feb 27, 2026
Merged

fix (socat): skip VSOCK_ECHO test (410) in %check and export SHELL env variable in %check#15998
ddstreetmicrosoft merged 2 commits intotomls/base/mainfrom
liunan/socat_toml

Conversation

@liunan-ms
Copy link
Contributor

@liunan-ms liunan-ms commented Feb 25, 2026

This PR:

  • Adds a spec-search-replace overlay to append test 410 to the existing NUMCOND exclusion list (alongside 146, 478, 528).
  • Adds an overlay to export the SHELL environment variable in the %check section to fix the SHELL variable undefined error 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/bash and azurelinux-4.0.tpl does not override config_opts['environment']. We will check inside the Koji builders to see if there's any overrides.
  • Moves socat from inline entry in components-full.toml to a dedicated comp.toml.

Validation:

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.
Copilot AI review requested due to automatic review settings February 25, 2026 23:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 %check section
  • Moved socat from 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.

@liunan-ms liunan-ms changed the title fix (socat): skip VSOCK_ECHO test (410) in %check fix (socat): skip VSOCK_ECHO test (410) in %check and export SHELL env variable in %check Feb 27, 2026
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"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated a mock build spec file like:

%check
echo $SHELL
exit 1

so 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'
Copy link
Contributor

@ddstreetmicrosoft ddstreetmicrosoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ddstreetmicrosoft ddstreetmicrosoft merged commit cba4c75 into tomls/base/main Feb 27, 2026
5 checks passed
@ddstreetmicrosoft ddstreetmicrosoft deleted the liunan/socat_toml branch February 27, 2026 21:12
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.

3 participants