How to contribute and run tests?

Issue #171 resolved
andrea crotti created an issue

I've looked in the documentation but I can't find any mention about how to contribute and run the unit tests for example.

I figured out that I might need to use build_ve and all_tests but it's still failing, and I get the error below with python2.7.. Also it looks like these scripts might be replace with TOX, which is apparently a great tool!

And just a couple of paragraphs explaining how to contribute would be nice and make life easier..


{{{ #!text

glibc detected /usr/bin/python2: double free or corruption (top): 0x0000000001cdd040 *** ======= Backtrace: ========= /lib/[0x7fbc9a12de66] /lib/[0x7fbc9a11e645] /usr/lib/[0x7fbc9a762c35] /usr/lib/[0x7fbc9a762c7c] /usr/lib/[0x7fbc9a752215] /usr/lib/[0x7fbc9a7524a8] /usr/lib/[0x7fbc9a7524a8] /usr/lib/[0x7fbc9a75386f] /usr/lib/[0x7fbc9a751a9e] /usr/lib/[0x7fbc9a75386f] /usr/lib/[0x7fbc9a6e00dc] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a6ca23f] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a750b5a] /usr/lib/[0x7fbc9a75386f] /usr/lib/[0x7fbc9a751a9e] /usr/lib/[0x7fbc9a7524a8] /usr/lib/[0x7fbc9a7524a8] /usr/lib/[0x7fbc9a75386f] /usr/lib/[0x7fbc9a6e01c9] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a6ca23f] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a74eb8c] /usr/lib/[0x7fbc9a75386f] /usr/lib/[0x7fbc9a6e00dc] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a6ca23f] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a7104a6] /usr/lib/[0x7fbc9a710108] /usr/lib/[0x7fbc9a6bb603] /usr/lib/[0x7fbc9a750b5a] /usr/lib/[0x7fbc9a75386f] /usr/lib/[0x7fbc9a7539a2] /usr/lib/[0x7fbc9a76dcac] /usr/lib/[0x7fbc9a76eab0] /usr/lib/[0x7fbc9a76f52f] /usr/lib/[0x7fbc9a780c45] /lib/[0x7fbc9a0d638d] /usr/bin/python2[0x4006a1] ======= Memory map: ======== 00400000-00401000 r-xp 00000000 fe:01 915972 /usr/bin/python2.7 00600000-00601000 r--p 00000000 fe:01 915972 /usr/bin/python2.7 00601000-00602000 rw-p 00001000 fe:01 915972 /usr/bin/python2.7 01336000-01d0d000 rw-p 00000000 00:00 0 [heap] 7fbc94b23000-7fbc94b38000 r-xp 00000000 fe:01 922769 /usr/lib/ 7fbc94b38000-7fbc94d38000 ---p 00015000 fe:01 922769 /usr/lib/ 7fbc94d38000-7fbc94d39000 rw-p 00015000 fe:01 922769 /usr/lib/ 7fbc94d39000-7fbc94d3d000 r-xp 00000000 fe:01 994895 /usr/lib/python2.7/lib-dynload/ 7fbc94d3d000-7fbc94f3c000 ---p 00004000 fe:01 994895 /usr/lib/python2.7/lib-dynload/ 7fbc94f3c000-7fbc94f3d000 r--p 00003000 fe:01 994895 /usr/lib/python2.7/lib-dynload/ 7fbc94f3d000-7fbc94f3f000 rw-p 00004000 fe:01 994895 /usr/lib/python2.7/lib-dynload/ 7fbc94f3f000-7fbc94f5b000 r-xp 00000000 fe:01 994890 /usr/lib/python2.7/lib-dynload/ 7fbc94f5b000-7fbc9515a000 ---p 0001c000 fe:01 994890 /usr/lib/python2.7/lib-dynload/ 7fbc9515a000-7fbc9515b000 r--p 0001b000 fe:01 994890 /usr/lib/python2.7/lib-dynload/ 7fbc9515b000-7fbc95164000 rw-p 0001c000 fe:01 994890 /usr/lib/python2.7/lib-dynload/ 7fbc95164000-7fbc95166000 r-xp 00000000 fe:01 994924 /usr/lib/python2.7/lib-dynload/ 7fbc95166000-7fbc95365000 ---p 00002000 fe:01 994924 /usr/lib/python2.7/lib-dynload/ 7fbc95365000-7fbc95366000 r--p 00001000 fe:01 994924 /usr/lib/python2.7/lib-dynload/ 7fbc95366000-7fbc95367000 rw-p 00002000 fe:01 994924 /usr/lib/python2.7/lib-dynload/ 7fbc95367000-7fbc9536f000 r-xp 00000000 fe:01 994931 /usr/lib/python2.7/lib-dynload/ 7fbc9536f000-7fbc9556e000 ---p 00008000 fe:01 994931 /usr/lib/python2.7/lib-dynload/ 7fbc9556e000-7fbc9556f000 r--p 00007000 fe:01 994931 /usr/lib/python2.7/lib-dynload/ 7fbc9556f000-7fbc95571000 rw-p 00008000 fe:01 994931 /usr/lib/python2.7/lib-dynload/ 7fbc95571000-7fbc95573000 r-xp 00000000 fe:01 994892 /usr/lib/python2.7/lib-dynload/ 7fbc95573000-7fbc95772000 ---p 00002000 fe:01 994892 /usr/lib/python2.7/lib-dynload/ 7fbc95772000-7fbc95773000 r--p 00001000 fe:01 994892 /usr/lib/python2.7/lib-dynload/ 7fbc95773000-7fbc95774000 rw-p 00002000 fe:01 994892 /usr/lib/python2.7/lib-dynload/ 7fbc95774000-7fbc95779000 r-xp 00000000 fe:01 994900 /usr/lib/python2.7/lib-dynload/ 7fbc95779000-7fbc95978000 ---p 00005000 fe:01 994900 /usr/lib/python2.7/lib-dynload/ 7fbc95978000-7fbc95979000 r--p 00004000 fe:01 994900 /usr/lib/python2.7/lib-dynload/ 7fbc95979000-7fbc9597b000 rw-p 00005000 fe:01 994900 /usr/lib/python2.7/lib-dynload/ 7fbc9597b000-7fbc9597e000 r-xp 00000000 fe:01 994926 /usr/lib/python2.7/lib-dynload/ 7fbc9597e000-7fbc95b7d000 ---p 00003000 fe:01 994926 /usr/lib/python2.7/lib-dynload/ 7fbc95b7d000-7fbc95b7e000 r--p 00002000 fe:01 994926 /usr/lib/python2.7/lib-dynload/ 7fbc95b7e000-7fbc95b7f000 rw-p 00003000 fe:01 994926 /usr/lib/python2.7/lib-dynload/ 7fbc95b7f000-7fbc95b82000 r-xp 00000000 fe:01 994944 /usr/lib/python2.7/lib-dynload/ 7fbc95b82000-7fbc95d81000 ---p 00003000 fe:01 994944 /usr/lib/python2.7/lib-dynload/ 7fbc95d81000-7fbc95d82000 r--p 00002000 fe:01 994944 /usr/lib/python2.7/lib-dynload/ 7fbc95d82000-7fbc95d83000 rw-p 00003000 fe:01 994944 /usr/lib/python2.7/lib-dynload/ 7fbc95d83000-7fbc95d8a000 r-xp 00000000 fe:01 994897 /usr/lib/python2.7/lib-dynload/ 7fbc95d8a000-7fbc95f89000 ---p 00007000 fe:01 994897 /usr/lib/python2.7/lib-dynload/ 7fbc95f89000-7fbc95f8a000 r--p 00006000 fe:01 994897 /usr/lib/python2.7/lib-dynload/ 7fbc95f8a000-7fbc95f8c000 rw-p 00007000 fe:01 994897 /usr/lib/python2.7/lib-dynload/ 7fbc95f8c000-7fbc95fe4000 r-xp 00000000 fe:01 917715 /usr/lib/ 7fbc95fe4000-7fbc961e3000 ---p 00058000 fe:01 917715 /usr/lib/ 7fbc961e3000-7fbc961e7000 r--p 00057000 fe:01 917715 /usr/lib/ 7fbc961e7000-7fbc961e8000 rw-p 0005b000 fe:01 917715 /usr/lib/ 7fbc961e8000-7fbc961e9000 rw-p 00000000 00:00 0 7fbc961e9000-7fbc96225000 r-xp 00000000 fe:01 1131740 /lib/ 7fbc96225000-7fbc96425000 ---p 0003c000 fe:01 1131740 /lib/ 7fbc96425000-7fbc96427000 r--p 0003c000 fe:01 1131740 /lib/ 7fbc96427000-7fbc9642d000 rw-p 0003e000 fe:01 1131740 /lib/ 7fbc9642d000-7fbc9642f000 rw-p 00000000 00:00 0 7fbc9642f000-7fbc96434000 r-xp 00000000 fe:01 994908 /usr/lib/python2.7/lib-dynload/ 7fbc96434000-7fbc96633000 ---p 00005000 fe:01 994908 /usr/lib/python2.7/lib-dynload/ 7fbc96633000-7fbc96634000 r--p 00004000 fe:01 994908 /usr/lib/python2.7/lib-dynload/ 7fbc96634000-7fbc96636000 rw-p 00005000 fe:01 994908 /usr/lib/python2.7/lib-dynload/ 7fbc96636000-7fbc9663a000 r-xp 00000000 fe:01 994918 /usr/lib/python2.7/lib-dynload/ 7fbc9663a000-7fbc96839000 ---p 00004000 fe:01 994918 /usr/lib/python2.7/lib-dynload/ 7fbc96839000-7fbc9683a000 r--p 00003000 fe:01 994918 /usr/lib/python2.7/lib-dynload/ 7fbc9683a000-7fbc9683b000 rw-p 00004000 fe:01 994918 /usr/lib/python2.7/lib-dynload/ 7fbc9683b000-7fbc9683e000 r-xp 00000000 fe:01 994925 /usr/lib/python2.7/lib-dynload/ 7fbc9683e000-7fbc96a3d000 ---p 00003000 fe:01 994925 /usr/lib/python2.7/lib-dynload/ 7fbc96a3d000-7fbc96a3e000 r--p 00002000 fe:01 994925 /usr/lib/python2.7/lib-dynload/ 7fbc96a3e000-7fbc96a3f000 rw-p 00003000 fe:01 994925 /usr/lib/python2.7/lib-dynload/ 7fbc96a3f000-7fbc96a43000 r-xp 00000000 fe:01 994947 /usr/lib/python2.7/lib-dynload/ 7fbc96a43000-7fbc96c43000 ---p 00004000 fe:01 994947 /usr/lib/python2.7/lib-dynload/ 7fbc96c43000-7fbc96c44000 r--p 00004000 fe:01 994947 /usr/lib/python2.7/lib-dynload/ 7fbc96c44000-7fbc96c46000 rw-p 00005000 fe:01 994947 /usr/lib/python2.7/lib-dynload/ 7fbc96c46000-7fbc96c5b000 r-xp 00000000 fe:01 175575 /usr/lib/ 7fbc96c5b000-7fbc96e5a000 ---p 00015000 fe:01 175575 /usr/lib/ 7fbc96e5a000-7fbc96e5b000 r--p 00014000 fe:01 175575 /usr/lib/ 7fbc96e5b000-7fbc96e5c000 rw-p 00015000 fe:01 175575 /usr/lib/ 7fbc96e5c000-7fbc9702a000 r-xp 00000000 fe:01 173874 /usr/lib/ 7fbc9702a000-7fbc9722a000 ---p 001ce000 fe:01 173874 /usr/lib/ 7fbc9722a000-7fbc97245000 r--p 001ce000 fe:01 173874 /usr/lib/ 7fbc97245000-7fbc97250000 rw-p 001e9000 fe:01 173874 /usr/lib/ 7fbc97250000-7fbc97254000 rw-p 00000000 00:00 0 7fbc97254000-7fbc972b3000 r-xp 00000000 fe:01 173869 /usr/lib/ 7fbc972b3000-7fbc974b2000 ---p 0005f000 fe:01 173869 /usr/lib/ 7fbc974b2000-7fbc974b6000 r--p 0005e000 fe:01 173869 /usr/lib/ 7fbc974b6000-7fbc974bc000 rw-p 00062000 fe:01 173869 /usr/lib/ 7fbc974bc000-7fbc974bd000 rw-p 00000000 00:00 0 7fbc974bd000-7fbc974c4000 r-xp 00000000 fe:01 994901 /usr/lib/python2.7/lib-dynload/ 7fbc974c4000-7fbc976c4000 ---p 00007000 fe:01 994901 /usr/lib/python2.7/lib-dynload/ 7fbc976c4000-7fbc976c5000 r--p 00007000 fe:01 994901 /usr/lib/python2.7/lib-dynload/ 7fbc976c5000-7fbc976c6000 rw-p 00008000 fe:01 994901 /usr/lib/python2.7/lib-dynload/ }}}

Comments (14)

  1. Ned Batchelder repo owner

    You are right, the test suite is complex to run, it would be better if it were more approachable. Tox does look interesting, though I would have to drop support for 2.3 in order to use it.

    About your stack trace, I have no idea what that is. Are you somehow mixing 32-bit and 64-bit compilation?

  2. andrea crotti reporter
    • changed status to open

    Not sure, how would I mix the compilation?

    Because I simply did "python develop" and it used gcc, I suppose just compiling for 64 bits since that's my architecture (archlinux by the way).

    About Tox well I think that the few people in the world that are still using 2.3 would not mind too much to use the coverage <= 3.5.. Even in the very very conservative place where I am now the oldest we get is 2.4..

  3. andrea crotti reporter
    • changed status to new

    Another problem is that in there is this line with an hardcoded path: source $ve/26/bin/activate

    but running build_ve with python2.7 that path is not generated (it's ve/27 instead) so from my understanding it' not really possible to use the test scripts unless you're running python26 as the default Python...

  4. Ned Batchelder repo owner

    I have no experience with archlinux, but I hear they do odd things like call python 3 "python", so maybe that's the problem? You are right about 2.3, changing toolsets is hard, I need to get into the proper mental state...

  5. andrea crotti reporter
    • changed status to open

    No I'm quite sure that's not the issue, since I changed the symlink long time ago ;)

    And how would that affect compilation of the C file?

  6. Ned Batchelder repo owner

    Python 2 and Python 3 have different header and different binary interfaces. You need to compile C extensions against the version of Python you're going to run them with. This is true for major versions also. A C extension compiled against 3.1 won't run under 3.2, for example.

  7. andrea crotti reporter
    • changed status to new

    Actually it's really really simple to set up tox.ini, I just added this file and it already does all the virtualenv dance:

    [tox] envlist = py24,py25,py26,py27,py31,py32

    [testenv] deps=nose commands=nosetests

    And by the way py32 succeds but py26 still generates the same error with the memory that I pasted above, and since now it's tox taking care of everything I don't think it can be a problem of compilation..

  8. Ned Batchelder repo owner

    I'm not sure why you think that an error under tox proves that the compilation isn't to blame? It's still compiling it on your system with whatever configuration you've got.

  9. Marc Abramowitz

    I'm getting this same glibc double free error with an experiment I'm doing running the tests on Travis CI. Did you ever figure out the cause?

  10. Ned Batchelder repo owner

    Marc, we never did figure it out, if you can provide more clues, that would be great.

  11. Marc Abramowitz

    OK, I got past this error with Travis. I'm not exactly sure what causes it, but I think it was happening when I was executing simply:


    I think when I changed it to:

    nosetests test

    it stopped happening. So my guess is that without pointing nosetests specifically at the test directory, it was running some other files which were not actually tests and that somehow caused chaos.

    It does seem like a good idea to write a bit of documentation for how to run the tests, as it took me a little while to figure out too. I might take a stab at this a bit later, unless you'd like to do it.

  12. Ned Batchelder repo owner

    Marc, thanks for getting me going on this. Now that we have tox well in hand, I wrote a Contributing page modeled on yours.

    Fixed in <<changeset 1bc03c573b88>>.

  13. Log in to comment