It is among the core perceptions that many Americans embrace about their legal system: Spouses never have to testify against spouses.

But Camille O. Cosby has found out that, whatever the perception, the reality of so-called spousal privilege is considerably more complicated.

Mrs. Cosby, who has been married to the entertainer Bill Cosby for 52 years, has already testified once in a defamation lawsuit filed against her husband. She is now in court trying to block a second session of testimony later this month.

For Mr. Cosby, who has not drawn much support as the sexual assault accusations against him climb, the fact that his wife is being pushed to testify in his case has engendered a smattering of something approaching sympathy on social media — evidence, experts said, of the special place marriage still holds in American society.