# Re: \[PATCH v2 3/3\] selftests/seccomp: Test SECCOMP\_IOCTL\_NOTIF\_ADDFD

- From: Kees Cook \<hidden\>
- Date: 2020-05-29 07:41:57 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2020/05/5982981
- Thread: https://ratatoskr.run/linux-api/2020/05/5981599/t.md

```text
On Thu, May 28, 2020 at 04:08:58AM -0700, Sargun Dhillon wrote:
> +	EXPECT_EQ(ioctl(listener, SECCOMP_IOCTL_NOTIF_SEND, &resp), 0);
> +
> +	nextid = req.id + 1;
> +
> +	/* Wait for getppid to be called for the second time */
> +	sleep(1);

I always rebel at finding "sleep" in tests. ;) Is this needed? IIUC,
userspace will immediately see EINPROGRESS after the NOTIF_SEND
finishes, yes?

Otherwise, yes, this looks good.

-- 
Kees Cook
```
