"The machine should be probed with different inputs (all unknown beforehand to the machine), only one of which is the real one, the others being test suites with known outputs."
Still, designed carefully, a secret subversion system may only be reachable by an intricate series of inputs (like a knocking or multiple ping-pong system) such that the odds of hitting it by chance are infinitesimally small. In every other case, it will work as designed...until that once-in-a-billion-plus input.