[PATCH v7 04/10] qemu_tpm, security, tests: change 'switch' clauses for 'if'