Exact distributions of a class of likelihood ratio test statistics