A suspected terrorist attack in a western Chinese province is raising security concerns just days before the start of the Olympics.