Low- and middle-income countries are grappling with widespread shortages of diagnostic tests for infections that kill millions.