test: Add smart card unlock console test with vlock - #8895
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new system test, test_smartcard__unlock_console_with_vlock, to verify unlocking a console with a smart card using vlock. The test utilizes an Expect script to automate interactive prompts. The feedback recommends replacing \n with \r in the Expect send commands when submitting PINs to prevent potential terminal hangs during raw/no-echo input modes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
thalman
left a comment
There was a problem hiding this comment.
I wonder if gemini is right about \n \r. I'm not so fluent in expect to judge. See my own comments.
spoore1
left a comment
There was a problem hiding this comment.
Overall looks good. Just one small issue that I ran into when testing.
spoore1
left a comment
There was a problem hiding this comment.
Looks like the test is failing in Fedora 45. This probably needs closer investigation.
Add system test for smart card authentication with vlock console unlock. The test configures a virtual smart card for a local user, logs in via su, and locks the terminal with vlock. It verifies that an incorrect PIN is rejected and the correct PIN successfully unlocks the session.