Project

General

Profile

Actions

action #156928

closed

[qe-core] test did not fail in sudo when it should have

Added by mgrifalconi 9 months ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Enhancement to existing tests
Target version:
Start date:
2024-03-08
Due date:
% Done:

0%

Estimated time:
Difficulty:
Sprint:
QE-Core: March Sprint 24 (Mar 06 - Mar 28)

Description

Context

See: https://suse.slack.com/archives/C02CLB8TZP1/p1709889781138779
And: https://bugzilla.suse.com/show_bug.cgi?id=1221134

Using the broken sudo update on 15-SP5: https://download.suse.de/ibs/SUSE:/Maintenance:/32785/SUSE_Updates_SLE-Module-Basesystem_15-SP5_x86_64/x86_64/
(I downloaded sudo-1.9.12p1-150500.7.7.1.x86_64.rpm in case it gets removed: https://gitlab.suse.de/mgrifalconi/broken-sudo-mirror/-/blob/main/sudo-1.9.12p1-150500.7.7.1.x86_64.rpm)

Clone a test in openQA or try it locally. Using this exact command you get the image with the broken sudo file already. Will not remain for long I guess.

/usr/share/openqa/script/clone_job.pl \
--from https://openqa.suse.de \
--host https://openqa.suse.de \
-v  13722839      \
--skip-chained-deps \
--ignore-missing-assets \
--skip-download \
--skip-checks \
_SKIP_POST_FAIL_HOOKS=1 \
SCHEDULE=tests/installation/bootloader_start,tests/boot/boot_to_desktop,tests/console/prepare_test_data,tests/console/consoletest_setup,tests/console/sudo \
TEST=developer-13722839-2 \
BUILD=developer-13722839-2 \
_GROUP="developer-13722839-2"

Use developer tab in openQA and stop execution before sudo test.

Login to VNC

visudo -f /etc/sudoers.d/bernhard

bernhard ALL = NOPASSWD: /usr/bin/ls

save and exit

su - bernhard
sudo -k
sudo ls

will ask for password when it should not.

Intead:

bernhard ALL = (root) NOPASSWD: /usr/bin/ls

Will work as expected.

We should improve the current sudo test: https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/tests/console/sudo.pm
to catch this issue.

Observation

openQA test in scenario sle-15-SP5-Server-DVD-Updates-x86_64-mau-extratests2@64bit fails in
sudo

Test suite description

Testsuite maintained at https://gitlab.suse.de/qa-maintenance/qam-openqa-yml. Run console tests against aggregated test repo

Reproducible

Fails since (at least) Build 20240305-1

Expected result

Last good: 20240304-2 (or more recent)

Further details

Always latest result in this scenario: latest

Actions #1

Updated by rfan1 9 months ago

  • Status changed from New to In Progress
  • Assignee set to rfan1
Actions #4

Updated by rfan1 9 months ago

  • Status changed from In Progress to Feedback

PR is merged, wait for next few openQA run results before closing it.

Actions #5

Updated by rfan1 9 months ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF