Branch Coverage

lib/Linux/FD.xs
Criterion Covered Total %
branch 67 136 49.2


line true false branch
25 0 1 if (!SvOK(sigmask))
0 0 if (!SvOK(sigmask))
0 0 if (!SvOK(sigmask))
27 1 0 if (!SvROK(sigmask) || !sv_derived_from(sigmask, "POSIX::SigSet"))
0 1 if (!SvROK(sigmask) || !sv_derived_from(sigmask, "POSIX::SigSet"))
30 1 0 return (sigset_t *) SvPV_nolen(SvRV(sigmask));
39 1 2 if (SvROK(signal))
42 1 1 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
0 1 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
1 0 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
1 0 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
0 0 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
1 0 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
1 0 int signo = (SvIOK(signal) || looks_like_number(signal)) && SvIV(signal) ? SvIV(signal) : whichsig(SvPV_nolen(signal));
44 2 0 SvGROW(buffer, sizeof(sigset_t));
2 0 SvGROW(buffer, sizeof(sigset_t));
45 2 0 sigset_t* ret = (sigset_t*)SvPV_nolen(buffer);
82 2 0 for (i = 0; i < sizeof clocks / sizeof *clocks; ++i) {
83 1 1 if (strEQ(clock_name, clocks[i].key))
92 0 0 if (!SvROK(ref) || !(value = SvRV(ref)))
0 0 if (!SvROK(ref) || !(value = SvRV(ref)))
94 0 0 return SvIV(value);
102 6 0 IO* io = GvIOn(gv);
6 0 IO* io = GvIOn(gv);
6 0 IO* io = GvIOn(gv);
6 0 IO* io = GvIOn(gv);
118 6 0 for (i = 0; i < map_size / sizeof *flags; ++i)
119 6 0 if (strEQ(SvPV_nolen(flag_name), flags[i].key))
5 1 if (strEQ(SvPV_nolen(flag_name), flags[i].key))
133 0 2 if (fd < 0)
146 0 3 if (fd < 0)
158 0 1 clockid_t clock_id = SvROK(clock) ? get_clock(clock, funcname) : get_clockid(SvPV_nolen(clock));
1 0 clockid_t clock_id = SvROK(clock) ? get_clock(clock, funcname) : get_clockid(SvPV_nolen(clock));
160 0 1 if (fd < 0)
167 5 8 if (value == -1 && errno == EINTR) {
0 5 if (value == -1 && errno == EINTR) {
168 0 0 PERL_ASYNC_CHECK();
189 3 2 for (i = 1; i < items; i++)
201 1 3 for (i = 1; i < items; i++)
213 1 1 for (i = 1; i < items; i++)
228 0 0 for (i = 2; i < items; i++)
244 0 6 } while (interrupted(ret));
245 3 3 if (ret == -1) {
246 3 0 if (errno == EAGAIN)
267 0 2 } while (interrupted(ret));
268 0 2 if (ret == -1) {
269 0 0 if (errno == EAGAIN)
288 0 0 for (i = 2; i < items; i++)
301 0 0 if(signalfd(fd, sv_to_sigset(sigmask, "signalfd"), 0) == -1)
315 0 2 } while (interrupted(tmp));
316 1 1 if (tmp == -1) {
317 1 0 if (errno == EAGAIN)
353 0 0 for (i = 2; i < items; i++)
367 0 1 if (timerfd_gettime(timer, &value) == -1)
369 0 1 mXPUSHn(timespec_to_nv(&value.it_value));
370 1 0 if (GIMME_V == G_ARRAY)
1 0 if (GIMME_V == G_ARRAY)
371 0 1 mXPUSHn(timespec_to_nv(&value.it_interval));
386 0 2 if (timerfd_settime(timer, (abstime ? TIMER_ABSTIME : 0), &new_itimer, &old_itimer) == -1)
388 0 2 mXPUSHn(timespec_to_nv(&old_itimer.it_value));
389 2 0 if (GIMME_V == G_ARRAY)
0 2 if (GIMME_V == G_ARRAY)
390 0 0 mXPUSHn(timespec_to_nv(&old_itimer.it_interval));
402 0 3 } while (interrupted(ret));
403 1 2 if (ret == -1) {
404 1 0 if (errno == EAGAIN)
419 5 1 for (i = 0; i < sizeof clocks / sizeof *clocks; ++i)
420 0 5 mXPUSHp(clocks[i].key, strlen(clocks[i].key));