[AI Generated] xfstests: don't replace /bin/gcc when devtoolset-7 install fails#4516
[AI Generated] xfstests: don't replace /bin/gcc when devtoolset-7 install fails#4516LiliDeng wants to merge 1 commit into
Conversation
…tall fails On CentOS 7 / RHEL 7, after attempting to install devtoolset-7-gcc with --skip-broken, the install code unconditionally removed /bin/gcc and replaced it with a symlink to /usr/bin/x86_64-redhat-linux-gcc. Two problems: 1. CentOS 7 SCL mirrors are EOL: mirrorlist.centos.org no longer resolves, so 'yum install --skip-broken devtoolset-7-gcc*' silently does nothing. The base gcc just installed by the previous yum step then gets deleted, leaving the system with no working compiler. configure fails with 'no acceptable C compiler found in PATH'. 2. The symlink target was hardcoded to x86_64; on aarch64 (e.g. CentOS 7.9 arm64) the binary is named aarch64-redhat-linux-gcc, so even when devtoolset-7 does install the symlink is dangling. Now only redirect /bin/gcc when devtoolset-7-gcc is actually installed AND the arch-specific binary exists. Otherwise leave the base gcc in place.
There was a problem hiding this comment.
Pull request overview
This PR hardens the xfstests dependency installation flow on RHEL/CentOS 7.x by preventing accidental removal of the system compiler when the devtoolset-7 installation silently fails (common now that CentOS 7 SCL mirrors are EOL), and by avoiding an x86_64-only symlink target on non-x86 architectures.
Changes:
- Gate
/bin/gccreplacement ondevtoolset-7-gccactually being installed. - Compute the arch-specific gcc driver name from
unameand only replace/bin/gccwhen the target binary exists.
❌ AI Test Selection — FAILED12 test case(s) selected (view run) Marketplace image: suse sles-15-sp6-arm64 gen2 latest
Test case details
| btrfs/339 (lisa_0_4) | ❌ FAILED | 0.000 | - output mismatch (see /home/lisatest/lisa_working/tool/xfstests/xfstests-dev/results//btrfs/btrfs/339.out.bad) |
johnsongeorge-w
left a comment
There was a problem hiding this comment.
For older distros, we can update the tests to skip execution if the required packages are not supported.
On CentOS 7 / RHEL 7, after attempting to install devtoolset-7-gcc with --skip-broken, the install code unconditionally removed /bin/gcc and replaced it with a symlink to /usr/bin/x86_64-redhat-linux-gcc. Two problems:
CentOS 7 SCL mirrors are EOL: mirrorlist.centos.org no longer resolves, so 'yum install --skip-broken devtoolset-7-gcc*' silently does nothing. The base gcc just installed by the previous yum step then gets deleted, leaving the system with no working compiler. configure fails with 'no acceptable C compiler found in PATH'.
The symlink target was hardcoded to x86_64; on aarch64 (e.g. CentOS 7.9 arm64) the binary is named aarch64-redhat-linux-gcc, so even when devtoolset-7 does install the symlink is dangling.
Now only redirect /bin/gcc when devtoolset-7-gcc is actually installed AND the arch-specific binary exists. Otherwise leave the base gcc in place.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results