mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-14 22:50:58 +01:00
Restore nvidia_config.sh's four test seams
The seams were applied, verified and measured, but never reached the
commit: cb1e8c53 shipped the file with its hardcoded /etc/X11,
/etc/profile and /home/$SUDO_USER paths. ci-mirror caught it by running
the suite from a clean checkout, where the tests read the REAL system
files -- the RenderAccel assertion failed against this machine's actual
xorg config, which says "disabled", and the pyroveil clone path came
back as /home/testuser rather than the tmpdir.
The local run passed only because a stale seamed copy was sitting in the
measurement worktree. Re-applied and grepped back immediately, which is
the documented rule for exactly this failure mode.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cb1e8c53c9
commit
9677da2832
@ -0,0 +1,41 @@
|
||||
{
|
||||
"intent": "Restore the four test seams in nvidia_config.sh, which were verified and measured but did not reach the previous commit, so the committed suite read and wrote the real system files.",
|
||||
"scope": [
|
||||
"linux_configuration/scripts/single_use/fixes/lib/nvidia_config.sh",
|
||||
"Non-goal: any change to the tests, which were already correct"
|
||||
],
|
||||
"changes": [
|
||||
"Re-applied the XORG_CONF, XORG_CONF_D, PROFILE_FILE and USER_HOME defaults at their assignment sites",
|
||||
"Grepped the file for all four immediately after writing it, before running anything, because a silently-reverted edit is exactly what caused this"
|
||||
],
|
||||
"verification": [
|
||||
{
|
||||
"command": "ci-mirror during git push",
|
||||
"result": "fail",
|
||||
"evidence": "'lib/tests suite failed: .../fixes/lib/tests/run_all.sh'. ci-mirror runs from a clean checkout of committed files, which is why it caught what the local run could not."
|
||||
},
|
||||
{
|
||||
"command": "bash run_all.sh from a detached worktree at the previous commit",
|
||||
"result": "fail",
|
||||
"evidence": "EXIT 1 with 10 failures, including 'configure_xorg: enables RenderAccel (expected \"RenderAccel\" \"true\", got: # NVIDIA configuration with RenderAccel disabled)' -- the suite was reading this machine's real /etc/X11 config, and 'does not re-clone over a checkout' showed a clone path of /home/testuser/pyroveil rather than the tmpdir."
|
||||
},
|
||||
{
|
||||
"command": "grep -n 'XORG_CONF:-|XORG_CONF_D:-|PROFILE_FILE:-|USER_HOME:-' nvidia_config.sh",
|
||||
"result": "pass",
|
||||
"evidence": "All four present at lines 26, 27, 60 and 85 after re-applying."
|
||||
},
|
||||
{
|
||||
"command": "shellcheck + shfmt -l on nvidia_config.sh",
|
||||
"result": "pass",
|
||||
"evidence": "No findings, zero suppressions, no reformat pending."
|
||||
}
|
||||
],
|
||||
"risks": [
|
||||
"The previous commit, cb1e8c53, is pushed and briefly had a suite that would write to the real /etc/X11/xorg.conf.d on any machine that ran it un-jailed. Nothing ran it in that window on this machine -- the real 20-nvidia.conf still carries its Jun 2025 mtime.",
|
||||
"The local run passed against a stale seamed copy in the measurement worktree, which is why a clean-checkout run is now the check that matters before pushing."
|
||||
],
|
||||
"rollback": [
|
||||
"git revert the commit; nvidia_config.sh returns to hardcoded paths and the suite will fail again from a clean checkout",
|
||||
"Re-run run_all.sh from a detached worktree to confirm the failure mode returns"
|
||||
]
|
||||
}
|
||||
@ -19,8 +19,12 @@ configure_xorg() {
|
||||
echo "2. Configuring Xorg Settings..."
|
||||
echo "==============================="
|
||||
|
||||
XORG_CONF="/etc/X11/xorg.conf"
|
||||
XORG_CONF_D="/etc/X11/xorg.conf.d"
|
||||
# These paths default to the real locations and are overridden only by
|
||||
# the test harness. They are plain globals ASSIGNED here rather than read
|
||||
# from the environment, so the default has to live at the assignment --
|
||||
# an exported value alone would be overwritten on entry.
|
||||
XORG_CONF="${XORG_CONF:-/etc/X11/xorg.conf}"
|
||||
XORG_CONF_D="${XORG_CONF_D:-/etc/X11/xorg.conf.d}"
|
||||
NVIDIA_CONF="$XORG_CONF_D/20-nvidia.conf"
|
||||
|
||||
# Create xorg.conf.d directory if it doesn't exist
|
||||
@ -53,7 +57,7 @@ configure_gcc_workaround() {
|
||||
echo "3. Configuring GCC Mismatch Workaround..."
|
||||
echo "=========================================="
|
||||
|
||||
local PROFILE_FILE="/etc/profile"
|
||||
local PROFILE_FILE="${PROFILE_FILE:-/etc/profile}"
|
||||
local timestamp
|
||||
timestamp=$(date)
|
||||
backup_file "$PROFILE_FILE"
|
||||
@ -78,7 +82,7 @@ install_pyroveil() {
|
||||
echo "4. Pyroveil Setup for Mesh Shader Issues..."
|
||||
echo "==========================================="
|
||||
|
||||
local user_home="/home/$SUDO_USER"
|
||||
local user_home="${USER_HOME:-/home/$SUDO_USER}"
|
||||
local pyroveil_dir="$user_home/pyroveil"
|
||||
|
||||
echo "Mesh shaders have poor support on NVIDIA drivers, causing issues in games"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user