Skip to content

[autobackport: sssd-2-9] tests: Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more#8478

Merged
alexey-tikhonov merged 1 commit into
SSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8449-to-sssd-2-9
Feb 24, 2026
Merged

[autobackport: sssd-2-9] tests: Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more#8478
alexey-tikhonov merged 1 commit into
SSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr8449-to-sssd-2-9

Conversation

@sssd-bot

Copy link
Copy Markdown
Contributor

This is an automatic backport of PR#8449 tests: Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more to branch sssd-2-9, created by @madhuriupadhye.

Please make sure this backport is correct.

Note

The commits were cherry-picked without conflicts.

You can push changes to this pull request

git remote add sssd-bot [email protected]:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr8449-to-sssd-2-9
git checkout SSSD-sssd-backport-pr8449-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr8449-to-sssd-2-9 --force

Original commits
2cdaaa4 - Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more

Backported commits

  • ed6e291 - Fix test_sudo__case_sensitive_false: use /bin/ls and /bin/cat instead of less/more

Original Pull Request Body

test_sudo__case_sensitive_false runs sudo via su -c (no TTY). less and more exit
non-zero without a terminal, so the test failed. Switched to /bin/ls and /bin/cat
so the run is non-interactive; the test still checks case-insensitive sudo rule
merging for user-1 and USER-1.

Assisted-by: Cursor (Composer-1.5)

@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

The pull request correctly addresses the issue of less and more commands failing in a non-TTY environment by replacing them with ls and cat. The changes are consistent across the test setup, steps, expected results, and the actual test logic. The fix improves the reliability of the test case without altering its core purpose of checking case-insensitive sudo rule merging.

Comment thread src/tests/system/tests/test_sudo.py
@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label Feb 24, 2026
@alexey-tikhonov
alexey-tikhonov removed their request for review February 24, 2026 13:20
@alexey-tikhonov alexey-tikhonov removed their assignment Feb 24, 2026
… of less/more

test_sudo__case_sensitive_false runs sudo via su -c (no TTY). less and more exit
non-zero without a terminal, so the test failed. Switched to /bin/ls and /bin/cat
so the run is non-interactive; the test still checks case-insensitive sudo rule
merging for user-1 and USER-1.

Assisted-by: Cursor (Composer-1.5)

Signed-off-by: Madhuri Upadhye <[email protected]>
Reviewed-by: Alexey Tikhonov <[email protected]>
Reviewed-by: Shridhar Gadekar <[email protected]>
(cherry picked from commit 2cdaaa4)
@sssd-bot

Copy link
Copy Markdown
Contributor Author

The pull request was accepted by @shridhargadekar with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-9-x86_64:upstream (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-9) (success)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot
sssd-bot force-pushed the SSSD-sssd-backport-pr8449-to-sssd-2-9 branch from ed6e291 to 4926bcb Compare February 24, 2026 13:45
@alexey-tikhonov
alexey-tikhonov merged commit 76b6a0e into SSSD:sssd-2-9 Feb 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted no-backport This should go to target branch only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants