[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread STINNER Victor
STINNER Victor added the comment: > I was always under the assumption that -j 4 runs tests in parallel If you run one test file, even with -j1000, only one test file will be run in parallel :-) To run the same file in parallel, you have to ask to run it more than once: "-j2 test_mailbox tes

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am able to reproduce it on my Mac and as below the values of os.getpid() are the same with the command. I will try to get to a Linux box to see if I can reproduce this. I was always under the assumption that -j 4 runs tests in parallel as it even

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread STINNER Victor
STINNER Victor added the comment: I failed to reproduce the issue on my Fedora 31 laptop using 20 processes running on parallel (my CPU has 4 cores: 8 threads). vstinner@apu$ ./python -Wall -m test -R 3:3 -j 20 test_mailbox -m test_clean -F 0:00:00 load avg: 14.86 Run tests in parallel using

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread STINNER Victor
STINNER Victor added the comment: ./python.exe -Wall -m test -R 4:4 -j 4 test_mailbox -m test_clean With this command: test_mailbox is run exactly once. It's not run in parallel. But the same test is run 8 times. os.getpid() = 27901 support.TESTFN = '@test_27901_tmp' os.getpid() = 27901 supp

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > You wrote "I guess the file is not really deleted in some cases." I think > that this should be investigated first. Sorry, I wanted to mean that as the test deletes the file and goes on to assert it's not present the other test that runs in paral

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If TESTFN is the same in different processes, there is something wrong in the code for running parallel tests. -- ___ Python tracker ___ _

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2020-01-09 Thread STINNER Victor
STINNER Victor added the comment: > yes, the test uses support.TESTFN which has the value of > "{}_{}_tmp".format(TESTFN, os.getpid()) in the setUp [0] to create tempdir. > Under parallel tests the pid value of TESTFN is initialised with a pid once > and used always in the setup calls. So se

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2019-12-30 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Should not parallel tests be ran in different directories? yes, the test uses support.TESTFN which has the value of "{}_{}_tmp".format(TESTFN, os.getpid()) in the setUp [0] to create tempdir. Under parallel tests the pid value of TESTFN is initia

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2019-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should not parallel tests be ran in different directories? -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue39029] TestMaildir.test_clean fails randomly under parallel tests

2019-12-12 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I can reproduce frequently the failure of test_clean on my Mac machine. It checks for removal of foo_path. It's removed by Maildir.clean that removes files based on the access time as below. The test also does similar thing with os.utime(foo_path