-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I am Punit Singh, and I have been working on Chutney for the past one week. I have already expressed my interest [1] in participating in GSOC this year for the project - Improving test coverage in tor.
I have made some changes to the code base of Chutney, including completing some TODO tasks. The code can be found here. [2]
I am currently in the process of completing the proposal for the project.
Here are the things I have done -
1. I am now able to understand the code base of Chutney. 2. I have read parts of the Tor specification [3], not the complete document. 3. I have computed the test coverage of tor, and have seen that some parts of the code are totally untested. [4] 4. I know about unit tests and integration tests, how to write them, how to write testable code, and so on.
I wanted some pointers as to how should I choose which function to write unit test for (with reference to the application requirement), and how should I go about writing the unit test (I know that I have to script individual clients using Stem, I just needed some guidance how to execute individual functions in the C code from Stem).
I am really interested as well as enthusiastic to work on this. I just need a little guidance.
Please correct me if I am thinking in the wrong direction.
Thanks, Punit
References - [1] https://lists.torproject.org/pipermail/tor-dev/2014-February/006317.html [2] https://github.com/punitkoura/chutney Branch : changes [3] https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=tor-spec.tx... [4] command.c circuitmax.c circuituse.c compat_libevent.c connection.c connection_edge.c
Hi Punit,
Unit test for individual functions are written in C (see src/test in Tor repo). Chutney + Stem is probably more suitable for integration test.
-- QP
On Sun 09 Mar 2014 03:48:03 PM EDT, Punit wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
I am Punit Singh, and I have been working on Chutney for the past one week. I have already expressed my interest [1] in participating in GSOC this year for the project - Improving test coverage in tor.
I have made some changes to the code base of Chutney, including completing some TODO tasks. The code can be found here. [2]
I am currently in the process of completing the proposal for the project.
Here are the things I have done -
- I am now able to understand the code base of Chutney.
- I have read parts of the Tor specification [3], not the complete
document. 3. I have computed the test coverage of tor, and have seen that some parts of the code are totally untested. [4] 4. I know about unit tests and integration tests, how to write them, how to write testable code, and so on.
I wanted some pointers as to how should I choose which function to write unit test for (with reference to the application requirement), and how should I go about writing the unit test (I know that I have to script individual clients using Stem, I just needed some guidance how to execute individual functions in the C code from Stem).
I am really interested as well as enthusiastic to work on this. I just need a little guidance.
Please correct me if I am thinking in the wrong direction.
Thanks, Punit
References - [1] https://lists.torproject.org/pipermail/tor-dev/2014-February/006317.html [2] https://github.com/punitkoura/chutney Branch : changes [3] https://gitweb.torproject.org/torspec.git?a=blob_plain;hb=HEAD;f=tor-spec.tx... [4] command.c circuitmax.c circuituse.c compat_libevent.c connection.c connection_edge.c
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJTHMVoAAoJEEBFGwew+1S1b2MH/1X0N+0sBl6tXiZ0w6FyWS2r MIGAN+IwvxTGOdHtk3/8926buSWAtCzhoW8XQX7IWOPDtPMQtQ9PqwhTDFRjl0tz MaHtXSfY6qOu8HToe6rJrVWiJxM+mP/v4VSLQ/tdKb5pl7AVwlli3xQnE0Qnu0UI ibOSROe9yBBtxzG2jdA5xxvlTuyUK2e5OKEjHA+qjCAXrJXqri5Zs0Kx1BYQRb2r K430hSaKAi74zw7abRjmeUXuuvWs1KJTWf7KtPcv6bjwIsO+sR5aiEL/bxQ8mAxC lB4+pKWsbW/X12BlbtY44TjUgX42kXNNq7GxyEqyYFCFuu82tVXVh3TMMH+qSs8= =ZxRG -----END PGP SIGNATURE----- _______________________________________________ tor-dev mailing list tor-dev@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev
On Sun, Mar 9, 2014 at 7:37 PM, Qingping Hou dave2008713@gmail.com wrote:
Hi Punit,
Unit test for individual functions are written in C (see src/test in Tor repo). Chutney + Stem is probably more suitable for integration test.
Right. If you want to do integration tests, you'll be using Chutney + Stem. If you want to write unit tests, you'll be using the infrastructure in src/test/test_* .
When picking a function or set of functions to write a test for, consider that the purpose of a GSoC application is to demonstrate to the mentor organization that you'll be able to do what they hope you'll be able to do.
So, what functions do we hope will be tested by the end of the summer? Most likely: tricky functions that perform complex behavior, that and have an important role in the Tor process.
Naturally, we don't expect that a student will be at full strength at the start of the process, but we'd like a sense of what you're able to do now, and how you approach a problem that presents a challenge. For example, in circuituse.c, I would be shocked if a student just starting with Tor were able to write a good set of tests for connection_ap_handshake_attach_circuit() or circuit_expire_building() -- those are tricky, nasty functions. But on the other hand wouldn't be impressed by an applicant who thought that testing circuit_enough_testing_circuits() was a good way to demonstrate their abilities -- as a function, it's just too simple.
Of that list of files you mentioned, I'd suggest that connection_edge.c probably has some good candidate functions for being not so hard to understand, but being tricky enough to represent a good way for a student to show their ability.
best wishes,