Message ID | 20230714182835.66326-1-remi@remlab.net |
---|---|
State | New |
Headers | show |
Series | checkasm RISC-V Linux perf enablement | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 4311a8ffcb..1da0877be5 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -317,7 +317,9 @@ static struct { const char *cpu_flag_name; const char *test_name; int verbose; -} state; +} state = { + .sysfd = -1, +}; /* PRNG state */ AVLFG checkasm_lfg; @@ -710,7 +712,7 @@ static int bench_init(void) static void bench_uninit(void) { #if CONFIG_LINUX_PERF - if (state.sysfd > 0) + if (state.sysfd != -1) close(state.sysfd); #endif }