Files
nvdriver/tests/software-manager/fixture.c
nvidia-driver-rs 4526e6a816 Baseline: validated 30/30 tree with passing Level 7 hardware regression
- Updated tools/post_reboot.sh to check kernel oops taint bit and stuck driver tasks instead of <86400s uptime
- Level 7 hardware regression passed on 0000:b3:00.0 (module 37e6fa430835eee2b426019db3ad70eeb7a9e9070c09c84bd9b973cf56cbe529, 107 inventory words, 0 static mismatches, CUDA baseline verified before and after)
- Updated .gitignore to exclude build archives (*.a, *.rlib), __pycache__, and raw trace dumps
2026-11-23 23:48:38 +00:00

29 lines
1.1 KiB
C

#define NV_RS_SOFTWARE_MANAGER_FIXTURE
#include "fixture.h"
_Thread_local struct task_struct fixture_task;
_Thread_local bool fixture_process=true;
unsigned fixture_warnings;
#include "../../kernel-open/nvidia/software_manager_adapter.c"
static unsigned alloc_calls,free_calls,fail_alloc,fail_free,live;
bool nv_rs_clock_store_process_context(void){return fixture_process;}
void *nv_rs_clock_store_alloc(size_t bytes)
{
void *p;
assert(fixture_process && READ_ONCE(manager_owner)==current);
alloc_calls++;
if(fail_alloc && alloc_calls==fail_alloc)return NULL;
p=calloc(1,bytes);if(p)live++;return p;
}
int nv_rs_clock_store_free(void *p)
{
assert(fixture_process && READ_ONCE(manager_owner)==current);
free_calls++;
if(fail_free && free_calls==fail_free)return -EAGAIN;
if(p){assert(live);live--;free(p);}return 0;
}
void fixture_set_alloc_fail(unsigned n){alloc_calls=0;fail_alloc=n;}
void fixture_set_free_fail(unsigned n){free_calls=0;fail_free=n;}
void fixture_set_process(bool value){fixture_process=value;}
unsigned fixture_live(void){return live;}
bool fixture_held(void){return READ_ONCE(manager_owner)==current;}