Fix tests return codes

Change-Id: Id755c6c9fb0303183be4e3b3dbf92849c715977b