testris: fixed the diff logic