]> git.proxmox.com Git - mirror_zfs.git/commit
tests/quota_005_pos: use a long int for doubling the quota size
authorRob Norris <rob.norris@klarasystems.com>
Tue, 16 Apr 2024 05:03:33 +0000 (15:03 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Apr 2024 23:06:37 +0000 (16:06 -0700)
commitf75574cbaaa1ade5bf24ab11751cbd5bc62ef7f1
tree220e54f8839ed7bde8ddeac396ccc8be04e0a2ec
parentcd3e6b4f4c5e0b514f3e76e194b2a5753264d44f
tests/quota_005_pos: use a long int for doubling the quota size

When run in isolation, quota_005_pos would see an empty ~300G dataset.
Doubling it's space overflows a int32, which meant it was trying to then
set the quota to a negative value, and would fail.

When run as part of the quota tests, the filesystem appears to have
stuff in it, and so a lower available space, which doesn't overflow, and
so succeeds.

The bare minimum fix seems to be to use a int64 for the available space,
so it can be comfortably doubled. Here it is.

(Also a typo fix and a tiny bit of cleanup).

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #16097
tests/zfs-tests/tests/functional/quota/quota_005_pos.ksh