ext4: test reserved GID block allocation

Create a small ext4 filesystem with a nonzero reserved block pool and a
reserved GID stored in the superblock. Fill ordinary free space as an
unprivileged user outside that group, verify that another allocation is
denied, then verify that the same user can allocate a block with the
reserved group as its primary and only supplementary group.

This exercises loading s_resgid from the superblock rather than overriding
it with a resgid mount option, and detects the regression fixed by:

commit c87abbab6147 ("ext4: fix incorrect function call when initializing s_resgid")

Link: https://lore.kernel.org/r/20261008065651.3517824-1-sahaj123.sc@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sahaj Chaudhari <sahaj123.sc@gmail.com>
Reviewed-by: Zorro Lang <zlang@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
2 files changed