From ddcd17399b1c1083a132772702d516c154815680 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 3 Jun 2021 09:42:42 -0700 Subject: Reset global_num_signals_received on RegisterSignalHandler Previously, the value of global_num_signals_received would persist between tests. Now, we reset the value to zero when we register a signal handler. PiperOrigin-RevId: 377308357 --- test/syscalls/linux/pipe.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'test/syscalls') diff --git a/test/syscalls/linux/pipe.cc b/test/syscalls/linux/pipe.cc index 294a72468..0bba86846 100644 --- a/test/syscalls/linux/pipe.cc +++ b/test/syscalls/linux/pipe.cc @@ -53,6 +53,7 @@ void SigRecordingHandler(int signum, siginfo_t* siginfo, } PosixErrorOr RegisterSignalHandler(int signum) { + global_num_signals_received = 0; struct sigaction handler; handler.sa_sigaction = SigRecordingHandler; sigemptyset(&handler.sa_mask); -- cgit v1.2.3