The primality tests that I have found, i.e. Fermat and Miller-Rabin don't return any false negatives, but do sometimes return false positives. That is, some composites are incorrectly decided as primes by these algorithms, but primes are always decided as primes.
Is there an efficient (polynomial time in length of the number) primality test that works the other way? That is, it will always correctly decide whether composite numbers are composite, but can sometimes mistake a prime number for a composite number?
The AKS primality test is what you are looking for.