Testing the generalized uncertainty principle with macroscopic mechanical oscillators and pendulums