Zhibin Li's GSoC status report - #7 of #13
Zhibin Li
08826794brmt at gmail.com
Wed Jul 4 03:22:51 UTC 2018
Hi all,
I'm so sorry for sending status report this late. I almost forget the due
date :(. Last week I was trying to cover part of code in net.c but it
didn't
go smoothly. I saw this in function print_get_linger() from net.c as
uncovered:
593 if (umoven(tcp, addr, len, &linger) < 0) {
594 printaddr(addr);
595 return;
596 }
And I tried to follow the code path and found that it' very unlikely for
this "umoven" to fail because of this from SYS_FUNC(getsockopt):
788 if (syserror(tcp) || umove(tcp, tcp->u_arg[4], &rlen) < 0) {
...
791 } else {
792 print_getsockopt(tcp, tcp->u_arg[1], tcp->u_arg[2],
...
Seems tests like "bad address" will meet the condition syserror(tcp) so
at this point printaddr(addr) on line 594 will not be executed. ldv told
me on IRC that "So it's very unlikely for umoven call in print_get_linger
to fail. It doesn't mean we can assume it will never fail, though." This
makes sense so I finally know it's not easy to cover this part in the
test. I should pay my attention on something else.
Beside, I've got feedback from ldv and I should write more tests now,
considering I've spent too much time on researching things. I'm planning
to write tests for SOL_* protocol levels in net.c at first.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20180704/d7c658ad/attachment.html>
More information about the Strace-devel
mailing list