Hi hyperwolf,
The pattern test writes a pattern to memory and then reads back that pattern. If you receive a failure its safe to say you should replace the RAM.
As far as the test passing a couple times, when the test starts it requests a block of available memory addresses from the OS. The amount allocated and tested directly correlates to how much memory is free at the time the test starts. This means it is possible to have a block of free addresses tested that are all good, while there may be a group of addresses that are bad, but they were not available for testing, and therefore not tested, so the test passes on that attempt. Hope that helps!