The weak equivalence principle is one of the cornerstone of general relativity. Its validity has been tested with impressive precision in the Solar System, with experiments involving baryonic matter and light. However, on cosmological scales and when dark matter is concerned, the validity of this principle is still unknown. In this paper we construct a null test that probes the validity of the equivalence principle for dark matter. Our test has the strong advantage that it can be applied on data without relying on any modelling of the theory of gravity. It involves a combination of redshift-space distortions and relativistic effects in the galaxy number-count fluctuation, that vanishes if and only if the equivalence principle holds. We show that the null test is very insensitive to typical uncertainties in other cosmological parameters, including the magnification bias parameter, and to non-linear effects, making this a robust null test for modified gravity.