From: Scott Mayhew <smayhew@redhat.com>
To: cel@kernel.org
Cc: kdevops@lists.linux.dev, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH] fstests: Make the use of "--badname" conditional
Date: Sun, 21 Apr 2024 21:11:13 -0400 [thread overview]
Message-ID: <ZiW5MUlzzyhi86UR@aion> (raw)
In-Reply-To: <20240421205017.390717-1-cel@kernel.org>
On Sun, 21 Apr 2024, cel@kernel.org wrote:
> From: Chuck Lever <chuck.lever@oracle.com>
>
> RHEL 8 does not implement "useradd --badname". Use the --badname
> option conditionally, based on OS family.
>
> Reported-by: Scott Mayhew <smayhew@redhat.com>
> Fixes: 08f095cf74f1 ("fstests: Enable creation of group "123456-fsgqa" on SuSE")
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Thanks, that fixes the issue on RHEL8 for me.
Acked-by: Scott Mayhew <smayhew@redhat.com>
-Scott
> ---
> playbooks/roles/fstests/defaults/main.yml | 1 +
> playbooks/roles/fstests/tasks/install-deps/suse/main.yml | 4 ++++
> playbooks/roles/fstests/tasks/main.yml | 2 +-
> 3 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/playbooks/roles/fstests/defaults/main.yml b/playbooks/roles/fstests/defaults/main.yml
> index 72100e934c39..302341420b58 100644
> --- a/playbooks/roles/fstests/defaults/main.yml
> +++ b/playbooks/roles/fstests/defaults/main.yml
> @@ -12,6 +12,7 @@ infer_uid_and_group: False
> oscheck_extra_args: ""
> limit_tests: ""
> dynamic_limit_tests:
> +badname_arg: ""
>
> fstests_start_after: False
> fstests_start_after_test: ""
> diff --git a/playbooks/roles/fstests/tasks/install-deps/suse/main.yml b/playbooks/roles/fstests/tasks/install-deps/suse/main.yml
> index 4520451dffbd..c4df15b9d677 100644
> --- a/playbooks/roles/fstests/tasks/install-deps/suse/main.yml
> +++ b/playbooks/roles/fstests/tasks/install-deps/suse/main.yml
> @@ -247,3 +247,7 @@
> when:
> - repos_present|bool
> - fstests_fstyp == "cifs"
> +
> +- name: Set the "--badname" arg
> + ansible.builtin.set_fact:
> + badname_arg: "--badname"
> diff --git a/playbooks/roles/fstests/tasks/main.yml b/playbooks/roles/fstests/tasks/main.yml
> index 6a78ff0938de..68f94fe8ed3e 100644
> --- a/playbooks/roles/fstests/tasks/main.yml
> +++ b/playbooks/roles/fstests/tasks/main.yml
> @@ -882,7 +882,7 @@
> become: yes
> become_flags: 'su - -c'
> become_method: sudo
> - ansible.builtin.command: "useradd --badname -d /home/{{ item }} -U {{ item }}"
> + ansible.builtin.command: "useradd {{ badname_arg }} -d /home/{{ item }} -U {{ item }}"
> with_items:
> - 123456-fsgqa
> - fsgqa
>
> base-commit: 1599e4587893efc07569f97adf7430935b6cf31c
> --
> 2.44.0
>
>
prev parent reply other threads:[~2024-04-22 1:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 20:50 [PATCH] fstests: Make the use of "--badname" conditional cel
2024-04-22 1:11 ` Scott Mayhew [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZiW5MUlzzyhi86UR@aion \
--to=smayhew@redhat.com \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).