Police charged a number of people with drug offences at a music festival participating in a controversial state government pill-testing trial.