Skip to content

test: Add smart card unlock console test with vlock - #8895

Open
krishnavema wants to merge 1 commit into
SSSD:masterfrom
krishnavema:vlock-tests
Open

test: Add smart card unlock console test with vlock#8895
krishnavema wants to merge 1 commit into
SSSD:masterfrom
krishnavema:vlock-tests

Conversation

@krishnavema

Copy link
Copy Markdown
Contributor

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.

@krishnavema
krishnavema requested a review from spoore1 July 3, 2026 15:19

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/tests/system/tests/test_smartcard.py Outdated
Comment thread src/tests/system/tests/test_smartcard.py Outdated

@thalman thalman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if gemini is right about \n \r. I'm not so fluent in expect to judge. See my own comments.

Comment thread src/tests/system/tests/test_smartcard.py Outdated
Comment thread src/tests/system/tests/test_smartcard.py Outdated
Comment thread src/tests/system/tests/test_smartcard.py Outdated
Comment thread src/tests/system/tests/test_smartcard.py

@spoore1 spoore1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Just one small issue that I ran into when testing.

Comment thread src/tests/system/tests/test_smartcard.py Outdated
Comment thread src/tests/system/tests/test_smartcard.py Outdated
Comment thread src/tests/system/tests/test_smartcard.py
@krishnavema
krishnavema requested review from spoore1 and thalman July 18, 2026 14:35
Comment thread src/tests/system/tests/test_smartcard.py Outdated

@thalman thalman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ACK

@spoore1 spoore1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the test is failing in Fedora 45. This probably needs closer investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants