File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
tools/testing/selftests/net/af_unix Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change 14
14
15
15
FIXTURE (scm_rights )
16
16
{
17
- int fd [16 ];
17
+ int fd [32 ];
18
18
};
19
19
20
20
FIXTURE_VARIANT (scm_rights )
21
21
{
22
- char name [16 ];
22
+ char name [32 ];
23
23
int type ;
24
24
int flags ;
25
25
bool test_listener ;
@@ -172,6 +172,8 @@ static void __create_sockets(struct __test_metadata *_metadata,
172
172
const FIXTURE_VARIANT (scm_rights ) * variant ,
173
173
int n )
174
174
{
175
+ ASSERT_LE (n * 2 , sizeof (self -> fd ) / sizeof (self -> fd [0 ]));
176
+
175
177
if (variant -> test_listener )
176
178
create_listeners (_metadata , self , n );
177
179
else
@@ -283,4 +285,23 @@ TEST_F(scm_rights, cross_edge)
283
285
close_sockets (8 );
284
286
}
285
287
288
+ TEST_F (scm_rights , backtrack_from_scc )
289
+ {
290
+ create_sockets (10 );
291
+
292
+ send_fd (0 , 1 );
293
+ send_fd (0 , 4 );
294
+ send_fd (1 , 2 );
295
+ send_fd (2 , 3 );
296
+ send_fd (3 , 1 );
297
+
298
+ send_fd (5 , 6 );
299
+ send_fd (5 , 9 );
300
+ send_fd (6 , 7 );
301
+ send_fd (7 , 8 );
302
+ send_fd (8 , 6 );
303
+
304
+ close_sockets (10 );
305
+ }
306
+
286
307
TEST_HARNESS_MAIN
You can’t perform that action at this time.
0 commit comments