They were not able to do the definitive kind of DNA test on the hair, only a test that tells what "maternal line" the person was from. We know that the person whose hair was in the trunk was (1) dead and (2) from the same "maternal line" as Casey. People in that line would include, e.g., Shirley P, Cindy's brothers, Cindy, Casey, Lee, and Caylee. Only Caylee is dead.
The hair found in the trunk also matched the hair found on the body, including decomposition characteristics, length, color, etc. Casey's hair was shorter and color-treated.