commit test and treat function for SDP