Commit 93e720d
committed
selftests/seccomp: More closely track fds being assigned
Since the open fds might not always start at "4" (especially when
running under kselftest, etc), start counting from the first assigned
fd, rather than using the more permissive EXPECT_GE(fd, 0).
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/lkml/20210527032948.3730953-1-keescook@chromium.org
Reviewed-by: Rodrigo Campos <rodrigo@kinvolk.io>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>1 parent e540ad9 commit 93e720d
1 file changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3954 | 3954 | | |
3955 | 3955 | | |
3956 | 3956 | | |
3957 | | - | |
| 3957 | + | |
3958 | 3958 | | |
3959 | 3959 | | |
3960 | 3960 | | |
| |||
3963 | 3963 | | |
3964 | 3964 | | |
3965 | 3965 | | |
| 3966 | + | |
3966 | 3967 | | |
3967 | 3968 | | |
| 3969 | + | |
3968 | 3970 | | |
3969 | 3971 | | |
3970 | 3972 | | |
3971 | 3973 | | |
3972 | 3974 | | |
3973 | 3975 | | |
| 3976 | + | |
3974 | 3977 | | |
3975 | 3978 | | |
3976 | 3979 | | |
3977 | | - | |
| 3980 | + | |
3978 | 3981 | | |
3979 | 3982 | | |
3980 | 3983 | | |
| |||
4029 | 4032 | | |
4030 | 4033 | | |
4031 | 4034 | | |
4032 | | - | |
| 4035 | + | |
4033 | 4036 | | |
4034 | 4037 | | |
4035 | 4038 | | |
4036 | 4039 | | |
4037 | 4040 | | |
4038 | 4041 | | |
4039 | | - | |
| 4042 | + | |
4040 | 4043 | | |
4041 | 4044 | | |
4042 | 4045 | | |
| |||
4070 | 4073 | | |
4071 | 4074 | | |
4072 | 4075 | | |
4073 | | - | |
4074 | | - | |
4075 | | - | |
| 4076 | + | |
| 4077 | + | |
| 4078 | + | |
| 4079 | + | |
| 4080 | + | |
4076 | 4081 | | |
4077 | 4082 | | |
4078 | 4083 | | |
| |||
0 commit comments