From e68b1017e3b46af7d118dad34a42128f97c9f971 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 07:26:44 +0000 Subject: [PATCH] [PR #6307/28bdf1ed backport][stable-6] xfs_quota: fix integration tests for Alpine Linux (#6310) xfs_quota: fix integration tests for Alpine Linux (#6307) * xfs_quota: fix integration tests for Alpine Linux * remove skip/alpine (cherry picked from commit 28bdf1ed74a0ddb95bfdc433202418b324b99c58) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- tests/integration/targets/xfs_quota/aliases | 1 - .../targets/xfs_quota/handlers/main.yml | 15 +++++++++++++++ .../targets/xfs_quota/tasks/gquota.yml | 2 +- .../integration/targets/xfs_quota/tasks/main.yml | 13 ++++++++++++- .../targets/xfs_quota/tasks/pquota.yml | 2 +- .../targets/xfs_quota/tasks/uquota.yml | 2 +- 6 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 tests/integration/targets/xfs_quota/handlers/main.yml diff --git a/tests/integration/targets/xfs_quota/aliases b/tests/integration/targets/xfs_quota/aliases index dd4714509e..d9f5f0fa35 100644 --- a/tests/integration/targets/xfs_quota/aliases +++ b/tests/integration/targets/xfs_quota/aliases @@ -7,7 +7,6 @@ azp/posix/vm needs/privileged needs/root skip/aix -skip/alpine # FIXME skip/osx skip/macos skip/freebsd diff --git a/tests/integration/targets/xfs_quota/handlers/main.yml b/tests/integration/targets/xfs_quota/handlers/main.yml new file mode 100644 index 0000000000..60e1e3d1fe --- /dev/null +++ b/tests/integration/targets/xfs_quota/handlers/main.yml @@ -0,0 +1,15 @@ +--- +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +# SPDX-License-Identifier: GPL-3.0-or-later + +- name: remove Alpine packages + when: ansible_distribution == 'Alpine' + package: + name: + - xfsprogs + - xfsprogs-extra + - mount + - umount + state: absent + listen: cleanup alpine diff --git a/tests/integration/targets/xfs_quota/tasks/gquota.yml b/tests/integration/targets/xfs_quota/tasks/gquota.yml index 88c6799d1a..caca1d341d 100644 --- a/tests/integration/targets/xfs_quota/tasks/gquota.yml +++ b/tests/integration/targets/xfs_quota/tasks/gquota.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create disk image - command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-gquota bs=1M count=20 + command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-gquota bs=1M count=400 ' - name: Create XFS filesystem diff --git a/tests/integration/targets/xfs_quota/tasks/main.yml b/tests/integration/targets/xfs_quota/tasks/main.yml index b1ad1da4e9..b3b700a70a 100644 --- a/tests/integration/targets/xfs_quota/tasks/main.yml +++ b/tests/integration/targets/xfs_quota/tasks/main.yml @@ -8,7 +8,18 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- block: +- name: setup Alpine + when: ansible_distribution == 'Alpine' + package: + name: + - xfsprogs + - xfsprogs-extra + - mount + - umount + state: latest + notify: cleanup alpine + +- block: - name: Create test user user: name: xfsquotauser diff --git a/tests/integration/targets/xfs_quota/tasks/pquota.yml b/tests/integration/targets/xfs_quota/tasks/pquota.yml index 58b92dff73..5053457ddb 100644 --- a/tests/integration/targets/xfs_quota/tasks/pquota.yml +++ b/tests/integration/targets/xfs_quota/tasks/pquota.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create disk image - command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-pquota bs=1M count=20 + command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-pquota bs=1M count=400 ' - name: Create XFS filesystem diff --git a/tests/integration/targets/xfs_quota/tasks/uquota.yml b/tests/integration/targets/xfs_quota/tasks/uquota.yml index 1cca2adb2c..36a7eff766 100644 --- a/tests/integration/targets/xfs_quota/tasks/uquota.yml +++ b/tests/integration/targets/xfs_quota/tasks/uquota.yml @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later - name: Create disk image - command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-uquota bs=1M count=20 + command: 'dd if=/dev/zero of={{ remote_tmp_dir }}/img-uquota bs=1M count=400 ' - name: Create XFS filesystem