Branch Coverage

MQ.xs
Criterion Covered Total %
branch 32 54 59.2


line true false branch
30 0 1 if (errno && val==-1) not_here("MQ_OPEN_MAX");
0 0 if (errno && val==-1) not_here("MQ_OPEN_MAX");
45 0 1 if (errno && val==-1) not_here("MQ_PRIO_MAX");
0 0 if (errno && val==-1) not_here("MQ_PRIO_MAX");
63 18 11 if (attr != NULL)
64 18 0 mqa_ptr = (struct mq_attr*) SvPV(attr, mqa_len);
67 2 27 if (mqdes == (mqd_t)-1) { XSRETURN_UNDEF; }
76 0 27 if (mq_close(mqdes) == -1) { XSRETURN_UNDEF; }
85 5 21 if (mq_unlink(name) == -1) { XSRETURN_UNDEF; }
99 38 4 if (new_attr == NULL)
101 0 38 if (mq_getattr(mqdes, &old_mqa) == -1) { XSRETURN_UNDEF; }
105 4 0 new_mqa_ptr = (struct mq_attr*) SvPV(new_attr, new_mqa_len);
107 0 4 if (mq_setattr(mqdes, new_mqa_ptr, &old_mqa) == -1) { XSRETURN_UNDEF; }
122 87 0 msg_ptr = SvPV(msg, msg_len);
123 2 85 if (mq_send(mqdes, msg_ptr, msg_len, msg_prio) == -1) { XSRETURN_UNDEF; }
137 0 67 if ((msg_ptr = malloc(msg_max_len)) == NULL) { XSRETURN_EMPTY; }
139 2 65 if (msg_len == -1)
144 0 65 XPUSHs(sv_2mortal(newSVpvn(msg_ptr, msg_len)));
145 0 65 XPUSHs(sv_2mortal(newSVuv(msg_prio)));
155 2 3 if (items > 1)
158 2 0 sigev.sigev_signo = SvIV(ST(1));
162 0 5 if (mq_notify(mqdes, sigevp) == -1) { XSRETURN_UNDEF; }
192 42 0 mqa_ptr = (struct mq_attr*) SvPV(mqa, mqa_len);
194 0 42 XPUSHs(sv_2mortal(newSViv(mqa_ptr->mq_flags)));
195 0 42 XPUSHs(sv_2mortal(newSViv(mqa_ptr->mq_maxmsg)));
196 0 42 XPUSHs(sv_2mortal(newSViv(mqa_ptr->mq_msgsize)));
197 0 42 XPUSHs(sv_2mortal(newSViv(mqa_ptr->mq_curmsgs)));