1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-07-05 10:08:58 +00:00
community.general/tests/integration/targets/filesystem/defaults/main.yml
Shreyash e1232fdcdf
filesystem: fix bcachefs get_fs_size() for new bcachefs-tools output format (#12291)
* filesystem: fix bcachefs get_fs_size() for new bcachefs-tools output format (#12259)

* filesystem: fix ruff formatting and enable bcachefs UUID tests

Fix ruff format violations (spaces around ** operators, single-quoted
regex string) and set bcachefs new_uuid to 'random' since it supports
UUID setting via -U/--uuid, fixing the set_fs_uuid_on_creation test
assertion failure on Arch Linux.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* filesystem: skip reset_fs_uuid test for bcachefs

bcachefs supports UUID at creation (-U/--uuid) but has no CHANGE_UUID
tool for resetting UUID on existing filesystems, so skip the
reset_fs_uuid test to avoid a get_bin_path(None) crash.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* filesystem: address review comments on bcachefs size parsing

* changelog: correct bcachefs-tools version to v1.38.4

The output format change (commit e635903b95) first appeared in
bcachefs-tools v1.38.4, not v1.37.0.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* changelog: add PR link to changelog fragment

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-23 20:38:08 +02:00

37 lines
2.1 KiB
YAML

---
# 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
tested_filesystems:
# key: fstype
# fssize: size (Mo)
# grow: true if resizefs is supported
# Other minimal sizes:
# - XFS: 20Mo
# - Btrfs: 150Mo (50Mo when "--metadata single" is used and 100Mb when on newer Fedora versions)
# - f2fs:
# - 1.2.0 requires at least 116Mo
# - 1.7.0 requires at least 30Mo
# - 1.10.0 requires at least 38Mo
# - resizefs asserts when initial fs is smaller than 60Mo and seems to require 1.10.0
bcachefs: {fssize: 20, grow: true, new_uuid: 'random', label: null}
ext4: {fssize: 10, grow: true, new_uuid: 'random', label: null}
ext4dev: {fssize: 10, grow: true, new_uuid: 'random', label: null}
ext3: {fssize: 10, grow: true, new_uuid: 'random', label: null}
ext2: {fssize: 10, grow: true, new_uuid: 'random', label: null}
xfs: {fssize: 300, grow: false, new_uuid: 'generate', label: null} # grow requires a mounted filesystem
btrfs: {fssize: 150, grow: false, new_uuid: null, label: null} # grow requires a mounted filesystem
reiserfs: {fssize: 33, grow: false, new_uuid: null, label: null} # grow not implemented
vfat: {fssize: 20, grow: true, new_uuid: null, label: null}
ocfs2: {fssize: '{{ ocfs2_fssize }}', grow: false, new_uuid: null, label: null} # grow not implemented
f2fs: {fssize: '{{ f2fs_fssize|default(60) }}', grow: 'f2fs_version is version("1.10.0", ">=")', new_uuid: null, label: null}
lvm: {fssize: 20, grow: true, new_uuid: 'something', label: null}
swap: {fssize: 10, grow: false, new_uuid: null, label: null} # grow not implemented
ufs: {fssize: 10, grow: true, new_uuid: null, label: null}
gfs2: {fssize: 50, grow: false, new_uuid: null, label: 'CLUSTER:LOCKSPACE'}
get_uuid_any: "blkid -c /dev/null -o value -s UUID {{ dev }}"
get_uuid_ufs: "dumpfs {{ dev }} | awk -v sb=superblock -v id=id '$1 == sb && $4 == id {print $6$7}'"
get_uuid_cmd: "{{ get_uuid_ufs if fstype == 'ufs' else get_uuid_any }}"