genkey1024.test started failing with the following error:
gpg: key generation failed: Card error
It appears to be due to commit b30c15bf and the following addition:
if (s) err = card_store_key_with_backup (ctrl, sub_psk, opt.homedir);
This is called even though card is 0, which suggests that this card-related
function shouldn't be called.
I'm assigning this to Niibe since it was his commit and he has a better
understanding of the smartcard-related code and the bug that he was trying to fix.