Skip to content
Commit 197ebb71 authored by Vishal Annapurve's avatar Vishal Annapurve Committed by Sean Christopherson
Browse files

KVM: selftests: move common startup logic to kvm_util.c

Consolidate common startup logic in one place by implementing a single
setup function with __attribute((constructor)) for all selftests within
kvm_util.c.

This allows moving logic like:
        /* Tell stdout not to buffer its content */
        setbuf(stdout, NULL);
to a single file for all selftests.

This will also allow any required setup at entry in future to be done in
common main function.

Link: https://lore.kernel.org/lkml/Ywa9T+jKUpaHLu%2Fl@google.com


Suggested-by: default avatarSean Christopherson <seanjc@google.com>
Reviewed-by: default avatarAndrew Jones <andrew.jones@linux.dev>
Reviewed-by: default avatarPeter Gonda <pgonda@google.com>
Signed-off-by: default avatarVishal Annapurve <vannapurve@google.com>
Link: https://lore.kernel.org/r/20221115213845.3348210-2-vannapurve@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 96b69958
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment