Why is my patch failing a test?
Basically your patch have to be applyable with the command

patch -p1 &lt; $filename.patch


http://drupal.org/node/707484 is a pretty good tutorial how to create patches so the testbot can use it.