Branch Coverage

blib/lib/Linux/Landlock/Direct.pm
Criterion Covered Total %
branch 13 42 30.9


line true false branch
276 1 2 unless (defined $fs_access_supported)
285 0 0 unless (defined $net_port_supported)
296 1 0 unless (defined $scoped_supported)
307 3 5 unless (defined $abi_version)
308 3 0 if (my $nr = NR('landlock_create_ruleset')) { }
321 0 1 if (ll_get_abi_version() >= 4)
324 0 1 if (ll_get_abi_version() >= 6)
333 0 1 unless my $nr = NR("landlock_create_ruleset")
335 1 0 if ($fd >= 0) { }
338 0 0 if (ll_get_abi_version() >= 6)
343 0 0 if ($fd > 0)
355 1 0 ref $parent ? :
357 0 1 unless my $nr = NR("landlock_add_rule")
359 1 0 $result == 0 ? :
366 0 0 unless my $nr = NR("landlock_add_rule")
369 0 0 $result == 0 ? :
374 0 0 unless my $nr = NR("prctl")
375 0 0 syscall($nr, $PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == 0 ? :
380 0 0 unless my $nr = NR("prctl")
386 0 0 unless my $nr = NR("landlock_restrict_self")
387 0 0 syscall($nr, $ruleset_fd, 0) == 0 ? :