Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-05-27 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by nickm):

 Hello71, or anybody: can you summarize what the actual problem is at this
 point?  Chelseakomlo, Manish, and I are all confused about where we are.

 It looks like the goal of this ticket is to make it so Tor's C code is
 linked with the Rust tests, so that Rust tests can call functions that
 invoke C functions.  And it looks like we're running into linking issues.
 But, what are they? And what are we trying?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-05-15 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by manish.earth):

 Sorry, yeah, I'm not very clear on what you need from me here.

 (Apologies for not responding earlier, I was super busy and then
 completely forgot. Feel free to bug me here or on twitter if that happens
 again)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-05-15 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by Hello71):

 so I realised that teor was right, you can't just have half of your
 program in a shared library. I think I was getting weird errors due to
 mixing gcc and llvm asan (different versions). I will try again hopefully
 this week with a shared library.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-05-14 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by chelseakomlo):

 Replying to [comment:39 Hello71]:
 > I give up. Manish, what should we do here?

 Do you mind clarifying the outstanding blockers for this ticket? It is a
 bit hard to follow what has been resolved/is still outstanding (if the
 "latest iteration" comment is still valid, but there are recently-
 discovered blockers to closing this issue, more clarify on those blockers
 would be helpful).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-05-01 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by Hello71):

 I give up. Manish, what should we do here?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-04-25 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by Hello71):

 It has occurred to me that shared libraries also split the global variable
 namespace along with the function namespace. This may be a problem.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-04-18 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by Hello71):

 latest iteration:

 1. still need to build a shared library

 2. still needs cleanup, i.e. splitting commits. current state of code
 LGTM, good if people want to review Tor on meson vs autotools :)

 3. needs testing on Mac and Windows (Rust should work on Windows now!)

 4. cargo testing a single directory is once again unsupported. should be
 possible without *too* much work, but I need to think of a good interface.
 I think this is not a huge issue though, since cargo doesn't rebuild
 everything anymore. Definitely shouldn't block this bug, anyways.

 5. everything works except rustdoc with asan due to aforementioned Rust
 bug. even Rust is built with asan, so it should catch everything asan can
 catch (within Rust limits, e.g. libstd is not instrumented). filed #25841
 for actually checking that this works.

 the basic architecture of this solution is fairly simple, and I tried to
 make minimal changes to the existing crate layout. it's basically 1. build
 a shared library, 2. get Rust to link with that shared library at compile-
 time, 3. use `LD_LIBRARY_PATH` so it can find it at run-time. the rest is
 finicky stuff to deal with Rust bugs like https://github.com/rust-
 lang/rust/issues/41807.

 "minimal changes" means build scripts instead of `links` key in manifest.
 the latter might be preferable since it means the build scripts don't need
 to know anything about where they're being built. however, because `links`
 keys may not be duplicated in a dependency tree, that requires all Rust ->
 C definitions to be in a single crate, which is better handled in #25639.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-04-16 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by Hello71):

 I have pushed to https://cgit.alxu.ca/tor.git/log/?h=meson an
 implementation of the shared library approach (along with a bunch of other
 crap that I'll have to separate out). This approach seems to be the most
 reliable and, with `-static-libasan`, hopefully fixes all issues with asan
 incompatibilities. remaining problems:

 1. still need to actually build a shared library, so either #23846 or
 switch to a better build system.

 2. rustdoc doesn't take `-Z sanitizer` (https://github.com/rust-
 lang/rust/issues/43031), but I think maybe we can hack around that by
 cleaning first and just accept that doctests won't have sanitizers for
 now.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-04-09 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-

Comment (by Hello71):

 so it looks like building the shared library is actually the right way to
 go. asan applies only to the shared library in this case, can probably use
 `-Z sanitizer=address` on nightly for rust tests. few hitches:

 1. libtool sucks. currently using meson. would rather we switch to that
 entirely, but not opposed to someone else figuring out how to make
 `libtor.so` (basically `tor` minus `tor_main.c`) using libtool instead

 2. still figuring out how best to link it in; hopefully will not use
 `RUSTFLAGS` so we don't have to recompile all dependencies on each test

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-04-02 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-
Changes (by chelseakomlo):

 * cc: manishearth@… (added)


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-04-01 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34, 034-triage-20180328,  |
  034-included-20180401  |
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  SponsorQ
-+-
Changes (by nickm):

 * keywords:
 rust, tor-test, 033-backport, review-group-34, 034-triage-20180328,
 034-removed-20180328
 =>
 rust, tor-test, 033-backport, review-group-34, 034-triage-20180328,
 034-included-20180401
 * sponsor:  Sponsor8-can => SponsorQ


Comment:

 Doing ''something'' here will be needed to make progress with our rust
 code, which is needed for privcount.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-27 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by chelseakomlo):

 Replying to [comment:29 Hello71]:
 > I think I agree that libtool is too much work. Possibly we could revisit
 that if we move to a better build system at some point.
 >
 > I think I'll try my wrapper linker solution again and see how it works.
 If that doesn't work out, I'll do the solution where we do CI builds "no
 rust, ubsan + asan", "rust, asan only".
 >
 >  Moreover, eventually it is likely that we will want real
 interdependencies between crates, and I think there is little to no value
 to juggle Rust dependencies when there are no even hypothetical plans to
 embed them in something other than Tor proper all together. I think the
 best solution is to just merge all our Rust crates together, and I've
 filed #25639 to that effect. There may be better solutions, and I'm open
 to suggestions, but it seems to me like that is the only practical one.


 This isn't actually true. For example, we are currently in discussion
 about modularizing tor such that we can have multiple builds (i.e, for
 mobile clients, hidden services, etc). Being able to include/not include
 crates in select builds will be valuable for this effort. Furthermore,
 external projects will be able to leverage this as well, in a way that is
 not currently possible with tor's C code.

 Moving all mode into a single crate is a non-starter for me, as this goes
 against the larger effort of having tor be more modular in the future.

 I would recommend looking at other Rust/C projects such as Gecko, talking
 to some Mozilla people, and thinking through something that both allows
 this functionality as well as enables us to have a clean/modular project
 structure into the future.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-27 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by Hello71):

 I think I agree that libtool is too much work. Possibly we could revisit
 that if we move to a better build system at some point.

 I think I'll try my wrapper linker solution again and see how it works. If
 that doesn't work out, I'll do the solution where we do CI builds "no
 rust, ubsan + asan", "rust, asan only".

 There is another problem though. The Rust code is not really well
 segmented into crates right now; it is possible for one crate to call
 ''indirectly'' code in another crate, through the magic of static linking.
 However, this does not work in tests, because there we only use Rust code
 from a single crate. Simply adding `libtor_rust.a` does not work, since
 then we get multiple definition errors. Presently, this is not an issue,
 because the linker automagically optimizes everything out with `--gc-
 sections --as-needed`. For some reason though, adding asan confuses the
 linker, and trying to test anything but protover causes undefined
 references to protover functions (because the C version is not compiled if
 Rust is enabled, but if we are testing Rust then we only add the current
 Rust crate). Moreover, eventually it is likely that we will want real
 interdependencies between crates, and I think there is little to no value
 to juggle Rust dependencies when there are no even hypothetical plans to
 embed them in something other than Tor proper all together. I think the
 best solution is to just merge all our Rust crates together, and I've
 filed #25639 to that effect. There may be better solutions, and I'm open
 to suggestions, but it seems to me like that is the only practical one.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-26 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by isis):

 * status:  needs_review => needs_revision


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-26 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by isis):

 Replying to [comment:26 isis]:
 > Oh, it also looks like your branch before squashing was failing when
 compiled with ASan? https://travis-
 ci.org/isislovecruft/tor/builds/357186429
 >
 > Locally I was configuring with `--enable-rust --enable-cargo-online-mode
 --enable-fatal-warnings`, and forgot to use `--enable-expensive-
 hardening`.
 >
 > Will check out the new branch and test that now.

 Okay, ASan is still failing here, and we discussed potential solutions in
 IRC a bit:

 1. Additionally build a libtor.so (and libtool-ise it?) and link it in
 when compiling with `cargo test`.
 2. Keep the original way that we're currently doing things in
 `src/rust/test_rust.sh`, but also add Hello71's branch here with a
 configure flag `--enable-testing-c-from-rust` (which sets `--disable-
 expensive-hardening`) and then we add a row/build to the CI build matrixes
 for additionally running that. (Potentially removing one of the cargo
 offline builds, since having two is a little overly-redundant… but that's
 a separate issue to this one.)
 3. Other not-as-good ideas were discussed.

 Any other ideas? Which of these sounds like a saner way forward?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-26 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by isis):

 Oh, it also looks like your branch before squashing was failing when
 compiled with ASan? https://travis-
 ci.org/isislovecruft/tor/builds/357186429

 Locally I was configuring with `--enable-rust --enable-cargo-online-mode
 --enable-fatal-warnings`, and forgot to use `--enable-expensive-
 hardening`.

 Will check out the new branch and test that now.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-26 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by Hello71):

 probably fixed non-system libraries

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-25 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by Hello71):

 rebased on master, added changes file

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-23 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by Hello71):

 * status:  merge_ready => needs_review


Comment:

 squashed and rebased on master (addition of `--all-features` flag). I only
 applied it in `test_rust.sh`; do you think it should be applied in
 `cargo_test` script instead? I think probably not, since I was trying to
 make `cargo_test` do basically the same thing as `cargo test`.

 setting needs_review for that and a quick sanity check that I didn't break
 anything while squashing. no major changes in the overall diff though.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-22 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  merge_ready
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by isis):

 Oh, also this needs a changes file. I can add that, if you like.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-22 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  merge_ready
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by isis):

 * status:  needs_review => merge_ready


Comment:

 Hi, this looks great! Thanks!

 Just one tiny thing: when you squash, please remove commit
 f7b714ba411eb7ccdfcafe676df28f81bb823b57, as it breaks out-of-directory
 builds. (It should be `$abs_top_srcdir` in that line, since the
 test_rust.sh script doesn't get copied to the build dir.)

 I added a commit on top in my `bug25386_v2` branch, which changed the test
 you added to actually check the functionality of
 `protover::compute_for_old_tor`, and found a bug (#XXX), so this is pretty
 cool.

 I recommend merging whenever Hello71 squashes, and then I'll put the tests
 I made/changed in #XXX.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-20 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by isis):

 * version:  Tor: 0.3.3.2-alpha => Tor: 0.3.3.1-alpha


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-17 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.2-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by Hello71):

 I dunno how I changed the version, if it was automatic or maybe I scrolled
 there by accident. Change it back if it's important.

 Commits are in chronological order for benefit of reviewers, I will rebase
 if approved. https://cgit.alxu.ca/tor.git/diff/?id2=master=fix-rust-
 tests for overview

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-17 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.2-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by Hello71):

 * status:  needs_revision => needs_review
 * version:  Tor: 0.3.3.1-alpha => Tor: 0.3.3.2-alpha


Comment:

 Fixed all problems except sanitizers not working. Asked #rust-beginners
 about building it using cargo, concluded it's too much work, and besides,
 `scripts/cargo_test` doesn't seem that much harder than `cargo test`. It
 would be nice to not duplicate the list of libraries, but I think that's a
 discussion for another time. this seems Good Enough for now.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-14 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by chelseakomlo):

 Cool, thanks for clarifying and for working on this.

 Another necessary criteria to think about for this effort is being able to
 run individual tests, or tests at a module level to ensure a quick
 feedback loop.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-14 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by Hello71):

 Replying to [comment:15 chelseakomlo]:
 > Hi, apologies for the late review, but is there a reason why the #3
 option in the description is for doctests only? Ideally, we would want
 linking for at minimum integration tests, ideally all levels of tests.

 er, I meant all tests. everything that gets run by `cargo test`.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-14 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-

Comment (by chelseakomlo):

 Hi, apologies for the late review, but is there a reason why the #3 option
 in the description is for doctests only? Ideally, we would want linking
 for at minimum integration tests, ideally all levels of tests.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-14 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by chelseakomlo):

 * cc: chelseakomlo (added)


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-14 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  3
 Reviewer:  isis |Sponsor:
 |  Sponsor8-can
-+-
Changes (by isis):

 * points:  1 => 3
 * sponsor:   => Sponsor8-can


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-13 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  needs_revision
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  1
 Reviewer:  isis |Sponsor:
-+-
Changes (by Hello71):

 * status:  assigned => needs_revision


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-13 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  Hello71
 Type:  defect   | Status:
 |  assigned
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  1
 Reviewer:  isis |Sponsor:
-+-
Changes (by Hello71):

 * owner:  (none) => Hello71
 * status:  needs_review => assigned


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-13 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  1
 Reviewer:  isis |Sponsor:
-+-

Comment (by Hello71):

 Replying to [comment:8 isis]:
 > 1. I reverted `350f76d3` and `8748ddac` in my `bug25386`
 [https://gitweb.torproject.org/user/isis/tor.git/log/?h=bug25386 branch],
 as they both affected the TravisCI builds to enable OSX (which takes
 ''forever'', hence why it's disabled by default) and also to (mostly?)
 disable clang (not sure why this was done? We like testing our C with
 different compilers, and clang's LeakSanitizer has
 [https://trac.torproject.org/projects/tor/ticket/25127 caught leaks] where
 GCC has not). Generally, in your personal repo, if you'd like to enable
 OSX builds for a branch, the way to do so is to make another branch off of
 it with the commits to enable the OSX builds, so that they don't
 accidentally get merged and make everyone's builds suddenly slow. (Also
 the changes seem to have [https://travis-
 ci.org/isislovecruft/tor/builds/353137303 resulted] in building with GCC
 and `--enable-cargo-online-mode` twice somehow?)

 This is why I don't like Travis's method of putting the configuration
 inside the repository. Here, I specifically want the changes to only apply
 to this branch. I suppose I could move that to another branch, and base
 this one on that one, but that sounds like a huge pain.

 > 2. Nick's `make test-rust` target from #25071 has been broken, due to no
 longer finding the `test_rust.sh` script.

 I will investigate.

 > 3. `make check` [https://travis-
 ci.org/isislovecruft/tor/builds/353137303 fails]. (That Travis build is
 just a copy of your branch that I prefixed with `testing/hello71/` to keep
 it out of my branch namespace.) It looks like it's pretty angry about
 missing symbols.

 Yes, I am aware, it doesn't work right with sanitizers. I discussed that
 with teor to some extent, but as I recall, I said "we should make a
 'libtor.so'", he said "no, that will cause more problems", and I thought
 "I don't see any better way of doing it. I'll come back to it later." and
 then forgot to come back to it. I think there might be a solution in
 `rustc -Csomething-or-other` though.

 > Locally, on my machine, building out-of-tree, it's mad about:
 > {{{
 > FAIL: src/test/test_rust.sh
 > ===
 >
 > error: could not find `Cargo.toml` in `/home/isis/code/torproject
 /tor-build/src/rust` or any parent directory`
 > }}}
 > (My `tor/` directory is at `/home/isis/code/torproject/tor`.) This
 will [https://jenkins.torproject.org/ break our Jenkins builds].
 >
 > I think once we're able to get these things fixed, then we can start on
 the UBSan/other sanitiser issues (possibly merging in-between).

 Ah, quite possible, I did not test this. I will investigate.

 Replying to [comment:9 isis]:
 > Oh, one more note:
 >
 > 4. This approach seems pretty sane, but one thing it won't allow is
 doing:
 > {{{#!sh
 > cd src/rust/protover
 > cargo test
 > }}}
 > and getting a positive result.  I'm not sure how much we should care
 about that, especially if—as a team—we're going to eventually agree that
 things will simply be rewritten in Rust, as opposed to maintained in both
 languages. (I.e. it's only a problem while we maintain both, and maintain
 the FFI boundary for both.)

 This seems easy to rectify, just make `test_rust.sh` take a crate to test,
 or potentially check the current directory or something. In theory, we
 could do it in cargo too, but I don't know how to add libraries only
 during testing (or if such a thing exists).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-13 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  1
 Reviewer:  isis |Sponsor:
-+-

Comment (by isis):

 Replying to [comment:8 isis]:
 > Hello Hello71! (hah) Thanks a whole bunch for looking into this and for
 the patches! This looks much better than the attempts I was making going
 through cargo and rust `#[cfg]` linker directives.
 >
 > Some notes on a couple issues:
 >
 > 1. I reverted `350f76d3` and `8748ddac` in my `bug25386`
 [https://gitweb.torproject.org/user/isis/tor.git/log/?h=bug25386 branch],
 as they both affected the TravisCI builds to enable OSX (which takes
 ''forever'', hence why it's disabled by default) and also to (mostly?)
 disable clang (not sure why this was done? We like testing our C with
 different compilers, and clang's LeakSanitizer has
 [https://trac.torproject.org/projects/tor/ticket/25127 caught leaks] where
 GCC has not). Generally, in your personal repo, if you'd like to enable
 OSX builds for a branch, the way to do so is to make another branch off of
 it with the commits to enable the OSX builds, so that they don't
 accidentally get merged and make everyone's builds suddenly slow. (Also
 the changes seem to have [https://travis-
 ci.org/isislovecruft/tor/builds/353137303 resulted] in building with GCC
 and `--enable-cargo-online-mode` twice somehow?)
 >
 > 2. Nick's `make test-rust` target from #25071 has been broken, due to no
 longer finding the `test_rust.sh` script.
 >
 > 3. `make check` [https://travis-
 ci.org/isislovecruft/tor/builds/353137303 fails]. (That Travis build is
 just a copy of your branch that I prefixed with `testing/hello71/` to keep
 it out of my branch namespace.) It looks like it's pretty angry about
 missing symbols. Locally, on my machine, building out-of-tree, it's mad
 about:
 > {{{
 > FAIL: src/test/test_rust.sh
 > ===
 >
 > error: could not find `Cargo.toml` in `/home/isis/code/torproject
 /tor-build/src/rust` or any parent directory`
 > }}}
 > (My `tor/` directory is at `/home/isis/code/torproject/tor`.) This
 will [https://jenkins.torproject.org/ break our Jenkins builds].
 >
 > I think once we're able to get these things fixed, then we can start on
 the UBSan/other sanitiser issues (possibly merging in-between).

 Oh, one more note:

 4. This approach seems pretty sane, but one thing it won't allow is doing:
 {{{#!sh
 cd src/rust/protover
 cargo test
 }}}
 and getting a positive result.  I'm not sure how much we should care
 about that, especially if—as a team—we're going to eventually agree that
 things will simply be rewritten in Rust, as opposed to maintained in both
 languages. (I.e. it's only a problem while we maintain both, and maintain
 the FFI boundary for both.)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-03-13 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
-+-
 Reporter:  Hello71  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  High |  Milestone:  Tor:
 |  0.3.4.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.3.3.1-alpha
 Severity:  Normal   | Resolution:
 Keywords:  rust, tor-test, 033-backport,|  Actual Points:
  review-group-34|
Parent ID:   | Points:  1
 Reviewer:  isis |Sponsor:
-+-

Comment (by isis):

 Hello Hello71! (hah) Thanks a whole bunch for looking into this and for
 the patches! This looks much better than the attempts I was making going
 through cargo and rust `#[cfg]` linker directives.

 Some notes on a couple issues:

 1. I reverted `350f76d3` and `8748ddac` in my `bug25386` [XXX branch], as
 they both affected the TravisCI builds to enable OSX (which takes
 ''forever'', hence why it's disabled by default) and also to (mostly?)
 disable clang (not sure why this was done? We like testing our C with
 different compilers, and clang's LeakSanitizer has
 [https://trac.torproject.org/projects/tor/ticket/25127 caught leaks] where
 GCC has not). Generally, in your personal repo, if you'd like to enable
 OSX builds for a branch, the way to do so is to make another branch off of
 it with the commits to enable the OSX builds, so that they don't don't
 accidentally get merged and make everyone's builds suddenly slow. (Also
 the changes seem to have [https://travis-
 ci.org/isislovecruft/tor/builds/353137303 resulted] in building with GCC
 and `--enable-cargo-online-mode` twice somehow?)

 2. Nick's `make test-rust` target from #25071 has been broken, due to no
 longer finding the `test_rust.sh` script.

 3. `make check` [https://travis-ci.org/isislovecruft/tor/builds/353137303
 fails]. (That Travis build is just a copy of your branch that I prefixed
 with `testing/hello71/` to keep it out of my branch namespace.) It looks
 like it's pretty angry about missing symbols. Locally, on my machine,
 building out-of-tree, it's mad about:
 {{{
 FAIL: src/test/test_rust.sh
 ===

 error: could not find `Cargo.toml` in `/home/isis/code/torproject/tor-
 build/src/rust` or any parent directory`
 }}}
 (My `tor/` directory is at `/home/isis/code/torproject/tor`.) This
 will [https://jenkins.torproject.org/ break our Jenkins builds].

 I think once we're able to get these things fixed, then we can start on
 the UBSan/other sanitiser issues (possibly merging in-between).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-02-28 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
--+
 Reporter:  Hello71   |  Owner:  (none)
 Type:  defect| Status:  needs_review
 Priority:  High  |  Milestone:  Tor:
  |  0.3.4.x-final
Component:  Core Tor/Tor  |Version:  Tor:
  |  0.3.3.1-alpha
 Severity:  Normal| Resolution:
 Keywords:  rust, tor-test, 033-backport  |  Actual Points:
Parent ID:| Points:  1
 Reviewer:|Sponsor:
--+
Changes (by teor):

 * keywords:  rust, tor-test => rust, tor-test, 033-backport
 * version:  Tor: 0.3.2.1-alpha => Tor: 0.3.3.1-alpha


Comment:

 Let's get a minimal solution working first, and then look at ubsan and
 shared libraries.

 Is the set of ".a" files minimal?
 Or should we use an environmental variable with that set of files instead?
 (For example, the set of tor source files linked into src/test/test would
 be a good place to start.)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-02-28 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
+
 Reporter:  Hello71 |  Owner:  (none)
 Type:  defect  | Status:  needs_review
 Priority:  High|  Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor|Version:  Tor: 0.3.2.1-alpha
 Severity:  Normal  | Resolution:
 Keywords:  rust, tor-test  |  Actual Points:
Parent ID:  | Points:  1
 Reviewer:  |Sponsor:
+
Changes (by Hello71):

 * status:  needs_revision => needs_review


Comment:

 still doesn't work with --enable-fragile-hardening due to ubsan, might
 work if that's commented out (or maybe not?)

 I still think the best way is to build a "libtor.so" and link all the
 tests with it, so we don't have to pass all the dependencies in or
 interrogate the toolchain about how to link sanitizers.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-02-28 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
+
 Reporter:  Hello71 |  Owner:  (none)
 Type:  defect  | Status:  needs_revision
 Priority:  High|  Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor|Version:  Tor: 0.3.2.1-alpha
 Severity:  Normal  | Resolution:
 Keywords:  rust, tor-test  |  Actual Points:
Parent ID:  | Points:  1
 Reviewer:  |Sponsor:
+
Changes (by teor):

 * status:  new => needs_revision


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-02-28 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
+
 Reporter:  Hello71 |  Owner:  (none)
 Type:  defect  | Status:  new
 Priority:  High|  Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor|Version:  Tor: 0.3.2.1-alpha
 Severity:  Normal  | Resolution:
 Keywords:  rust, tor-test  |  Actual Points:
Parent ID:  | Points:  1
 Reviewer:  |Sponsor:
+

Comment (by teor):

 Hello71 has a branch here: https://cgit.alxu.ca/tor.git/commit/?h=fix-
 rust-tests

 But it needs to inherit libraries and library flags from the Makefile,
 And it needs to build Rust with asan, if asan is turned on.

 We want to pass the `-Z sanitizer` flag to Rust:
 https://github.com/japaric/rust-san

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #25386 [Core Tor/Tor]: fix rust tests

2018-02-28 Thread Tor Bug Tracker & Wiki
#25386: fix rust tests
+
 Reporter:  Hello71 |  Owner:  (none)
 Type:  defect  | Status:  new
 Priority:  High|  Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor|Version:  Tor: 0.3.2.1-alpha
 Severity:  Normal  | Resolution:
 Keywords:  rust, tor-test  |  Actual Points:
Parent ID:  | Points:  1
 Reviewer:  |Sponsor:
+
Changes (by teor):

 * version:   => Tor: 0.3.2.1-alpha
 * component:  - Select a component => Core Tor/Tor
 * points:   => 1
 * milestone:   => Tor: 0.3.4.x-final
 * keywords:   => rust, tor-test
 * type:  enhancement => defect


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs