depends on how long you want to run it. the longer a stability test is the more chance there is to see if it can run without any problems.
some ppl run it for an hour and some have even run tests overnight and up to 24 hours.
just make sure you dont waste to much time testing stability, i would say 4-5 hours is good enough.
With a test of 2 hours with linx, I can estimate my system stable. Most of the time I failed at around 1 hour until I put the magic amount of voltage, nothing happened then.
As alhanelem pointed it, longer you run your test, lower are the chance you'll encounter a stability issue.
Also, check out that all of your memory is stressed. I could run prime in small FFT for hours and fail after 1 min linx
LinX is really simple and fully stress your system. Prime is fine but you always have to select custom test then set an amount of memory to properly stress your system and find errors.