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);
76 2 0 for (i = 0; i < sizeof clocks / sizeof *clocks; ++i) {
77 1 1 if (strEQ(clock_name, clocks[i].key))
86 0 0 if (!SvROK(ref) || !(value = SvRV(ref)))
0 0 if (!SvROK(ref) || !(value = SvRV(ref)))
88 0 0 return SvIV(value);
96 6 0 IO* io = GvIOn(gv);
6 0 IO* io = GvIOn(gv);
6 0 IO* io = GvIOn(gv);
6 0 IO* io = GvIOn(gv);
112 6 0 for (i = 0; i < map_size / sizeof *flags; ++i)
113 6 0 if (strEQ(SvPV_nolen(flag_name), flags[i].key))
5 1 if (strEQ(SvPV_nolen(flag_name), flags[i].key))
127 0 2 if (fd < 0)
140 0 3 if (fd < 0)
152 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));
154 0 1 if (fd < 0)
161 5 8 if (value == -1 && errno == EINTR) {
0 5 if (value == -1 && errno == EINTR) {
162 0 0 PERL_ASYNC_CHECK();
183 3 2 for (i = 1; i < items; i++)
195 1 3 for (i = 1; i < items; i++)
207 1 1 for (i = 1; i < items; i++)
222 0 0 for (i = 2; i < items; i++)
238 0 6 } while (interrupted(ret));
239 3 3 if (ret == -1) {
240 3 0 if (errno == EAGAIN)
261 0 2 } while (interrupted(ret));
262 0 2 if (ret == -1) {
263 0 0 if (errno == EAGAIN)
282 0 0 for (i = 2; i < items; i++)
295 0 0 if(signalfd(fd, sv_to_sigset(sigmask, "signalfd"), 0) == -1)
309 0 2 } while (interrupted(tmp));
310 1 1 if (tmp == -1) {
311 1 0 if (errno == EAGAIN)
347 0 0 for (i = 2; i < items; i++)
361 0 1 if (timerfd_gettime(timer, &value) == -1)
363 0 1 mXPUSHn(timespec_to_nv(&value.it_value));
364 1 0 if (GIMME_V == G_ARRAY)
1 0 if (GIMME_V == G_ARRAY)
365 0 1 mXPUSHn(timespec_to_nv(&value.it_interval));
380 0 2 if (timerfd_settime(timer, (abstime ? TIMER_ABSTIME : 0), &new_itimer, &old_itimer) == -1)
382 0 2 mXPUSHn(timespec_to_nv(&old_itimer.it_value));
383 2 0 if (GIMME_V == G_ARRAY)
0 2 if (GIMME_V == G_ARRAY)
384 0 0 mXPUSHn(timespec_to_nv(&old_itimer.it_interval));
396 0 3 } while (interrupted(ret));
397 1 2 if (ret == -1) {
398 1 0 if (errno == EAGAIN)
413 5 1 for (i = 0; i < sizeof clocks / sizeof *clocks; ++i)
414 0 5 mXPUSHp(clocks[i].key, strlen(clocks[i].key));