mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
generic: test GETNEXTQUOTA near INT_MAX
XFS kernel code had a bug where GETNEXTQUOTA-type quotactls requesting an ID near UINT_MAX could overflow and return 0 as the "next" active ID. This test checks that by creating an active quota near UINT_MAX, then asking for the next one after it. The proper answer is ENOENT, but if we wrap we'll return ID 0. This also changes test-nextquota.c so that it checks both GETNEXTQUOTA and XGETNEXTQUOTA even if one fails; it stores the failure conditions and returns 1 if either of them fails. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
QA output created by 400
|
||||
Launch all quotas
|
||||
Ask for ID after 4294967293 expecting nothing
|
||||
Q_GETNEXTQUOTA: No such file or directory
|
||||
Q_XGETNEXTQUOTA: No such file or directory
|
||||
Ask for ID after 4294967293 expecting nothing
|
||||
Q_GETNEXTQUOTA: No such file or directory
|
||||
Q_XGETNEXTQUOTA: No such file or directory
|
||||
Reference in New Issue
Block a user