test(build): the DLSS cache check reads the preprocessed value instead of running a program #1090
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!1090
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/Longshot:fix/dlss-test-no-exe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: test · Risk: low · Tested on: Windows 11 (g++ 10.3, clang 23.1.5 llvm-mingw), Linux (gcc 14.2, Docker) · Needs: none
Why
Running the test suite on Windows makes Defender report a trojan.
tests/test_dlss_sdk_cache.pybuilds a one-line program (int main() { return SDK_VALUE; }) into adlss-sdk-cache-*folder in%TEMP%and runs it for its exit code. Defender's machine-learning guess quarantines it asTrojan:Win32/Bearfoos.A!ml(!ml: a model's guess, not a signature). That is a false alarm, but it frightens whoever runs the suite, and the quarantine fails the check in a full run while it passes alone. This came in with the check (#1648 on GitHub) and is still on main; no issue on the tracker covers it (searched for Defender, trojan, antivirus, dlss).How to reproduce
Seen on: Windows 11, Defender on (real-time protection)
Settings and switches: defaults
Steps:
python -I -B tests/run_all.pyon mainExpected: every check passes, with no Defender alert
Actual: Defender flags
%TEMP%\dlss-sdk-cache-*\0.exeasTrojan:Win32/Bearfoos.A!ml;test_dlss_sdk_cachefails in the full run and passes on its ownWhat changed
The check no longer links or runs anything. It preprocesses the source with the job's own flags and reads
SDK_VALUEfrom the text, so the cache keys, the compiles' inputs and every assertion stay as they were.result()intests/test_dlss_sdk_cache.pyruns the compiler with the job's flags plus-E -P(-MDleft out, so no depfile is written), with the temp folder as the working folder. It caches the value it reads by the job's key, where it used to cache an exe.Measurements
Verdict: nothing to measure. This is a test-only change and the game is untouched; the check takes 0.5 s.
Flags and settings
None
Testing
Tested:
run_allpicks here):python -I -B tests/run_all.py test_dlss_sdk_cachepasses. This is the one check that reads this diff; the whole suite was not run.python -I -B tests/test_dlss_sdk_cache.py --cxx <clang++>passes.python:3.12Docker image): the same command passes.nx2/build.pywith the SDK headers taken out of the DLSS object's key (ngx_deps = b''), it fails with "SDK header edit reused stale DLSS code from the actual job key".dlss-sdk-cache-*folder is left in%TEMP%.Not tested: clang on Linux. The flags are the same
-E -Pthat gcc took, and nothing else changes there.Must be tested: None
Risks
What could break: only this check. A compiler that doesn't take
-E -Pwould fail it; gcc and clang both take them.Turning it off: revert the commit
Compatibility: Nothing changes
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.🤖 Generated with Claude Code
WIP: test(build): the DLSS cache check reads the preprocessed value instead of running a programto test(build): the DLSS cache check reads the preprocessed value instead of running a program