Some other tests that can help in the diagnosis of cystic fibrosis include:  Chest x-rays. Lung function tests for children over 5 years of age. Sputum, or phlegm, cultures.