How do you ensure that the machine is actually running the software it's supposed to be? Even years ago, many boot sector viruses would patch the "sector read" routine so that a request to read the boot sector would return a copy of the legitimate one, and such games continue with things like the XCP rootkit distributed by Sony. If hardware isn't set up to prevent stealthing, it may be very difficult to ensure that machines aren't running fake software.
In auditing we call it "black box" test. You run data through and see that the results are what is expected.
In this case a program could be created that mimic's voting and runs data through that should yield a predetermined result. This and other diagnostics could be designed, tested and reported on to insure the machine is operating properly.