A bad earth on your engine ECU could present numerous faults - fairly typical is a MAF sensor or Oxygen sensor fault. The ECU doesn't nescessarily earth direct through the unit to the engine block and may utilise a number of harness connector pins that lead to an earth external of the unit. Be careful if testing earths as the ECU also switches various sensors to earth, so it's not like a permanent earth and may lead to confusion. If you have a fault that indicates a lost earth, then most prob that ECU is at fault.
Replacing an ECU on a Corsa (depending on yr) means that the original ECU has to be reset (links with immobiliser etc) and then a new unit reprogrammed. A secondhand unit cannot be used unless the unit is reset before being removed from the donor vehicle - note that contrary to a number of posts found all over the net, disconnecting the battery does not reset the ECU so far as to enable a swap. It means that it loses the learn values only. You'll prob need dealer to 'flash' your replacement ECU (don't know of any other diagnostic tool that can do this).
I know these things as I am having the same issue on a Corsa C (2003) with the Z10XEP engine. Just for info', if your engine code is as above then note that most things are VERY expensive! New ECU-£277 + VAT!!!
Damn Corsa!
July 2008