[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #19999 [Core Tor/Tor]: Maybe test-cases should complete without BUG warnings?
#19999: Maybe test-cases should complete without BUG warnings?
---------------------------------------+-----------------------------------
Reporter: nickm | Owner: nickm
Type: defect | Status: needs_review
Priority: High | Milestone: Tor:
| 0.2.9.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: testing TorCoreTeam201609 | Actual Points: 3
Parent ID: | Points: 2
Reviewer: | Sponsor:
---------------------------------------+-----------------------------------
Comment (by rubiate):
Tangentially related; addr/ip6_helpers will usually crash if run with
--verbose
The loop which builds the string in src/test/test_addr.c:88 never gets run
because it declares `ii_=0` but uses `i` as the condition, and `i` is
already incremented to 16 on test_addr.c:278
Possible fix: (using `j` here instead of `ii_` to avoid touching every
line realigning the backslashes)
{{{
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index c8a9e6d..1d91194 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -85,10 +85,10 @@ test_addr_basic(void *arg)
char *, "%s", \
{ char *cp; \
cp = print_ = tor_malloc(64); \
- for (int ii_=0;i<16;++i) { \
- tor_snprintf(cp, 3,"%02x", (unsigned)value_->s6_addr[i]);\
+ for (int j=0;j<16;++j) { \
+ tor_snprintf(cp, 3,"%02x", (unsigned)value_->s6_addr[j]);\
cp += 2; \
- if (ii_ != 15) *cp++ = ':'; \
+ if (j != 15) *cp++ = ':'; \
} \
}, \
{ tor_free(print_); }, \
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/19999#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs