testprogs: Add a common test_smbclient_expect_failure() function