A ground loop is a current across a conductor, created by a difference in potential between two grounded points, as in two buildings connected by a run of RS-232 or other data line. When two devices are connected and their potentials are different, voltage flows from high to low by traveling through the data cable.
If the voltage potential is large enough, your equipment won’t be able to handle the excess voltage and one of your ports will be damaged.
You can’t test for ground loops. You don’t know you have one until a vital component fails. Only prevention works—use optical isolation or fibre optic cable on all your long data lines.