There were actually more problems in this area:
Slaves (if any) were unconditionally restarted, this appears unnecessary.
Sort criteria were suboptimal, included the test name.
Added logic to "reserve" a sequence of tests with same config for one thread
Got rid of sort_criteria hash, put it into the test case itself
Adds little sanity check that expected worker picks up test
Fixed some tests that may fail if starting on running server
Some of these fail only if *same* test is repeated.
Finally, special sorting of tests that do --force-restart
Particularly for BUG#1340 mysqlbinlog coredumps when reading Exec
event without seeing Create_file event before
mysql-test/mysql-test-run.sh:
Now mysqlbinlog will use proper temporary directory