Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests/bpf: Handle SIGINT when creating netns
It's necessary to delete netns during BPF selftests interrupt, otherwise the next tests run will fail due to unable to create netns. This patch adds a new SIGINT handle netns_sig_handler() in create_netns(), and deletes NS_TEST in this handler. For passing argument to signal handler, a trick mentioned in [1] is used. [1] https://stackoverflow.com/questions/6970224/providing-passing-argument-to-signal-handler Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
- Loading branch information