What is the test for S.H.M.?

The acceleration of the particle (executing S.H.M. should be directly proportional to its displacement from the mean position and the acceleration must aims towards the centre of the S.H.M.