It is clear gun violence needs to be addressed on many levels including on the level of mental health. If drug tests are required as part of background checks for purchasers of guns then we address this on the level of mental health. Potential addicts and people on antipsychotic drugs could be excluded. We could then direct addicts to therapy before they attempt to purchase guns again. We could alert the prescribers of antipsychotics that their patient is attempting to purchase a gun.
In addition, most drug traffickers are drug users and this would limit their ability to buy guns legally. Of course this would mean that background checks would have to be done at gun shows and private sales. Perhaps purchasers could get a "pre-approved" background check including their drug test before they go to buy a gun.