Pharmaceutical quality control testing to meet safety and quality requirements