]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic: test GETNEXTQUOTA near INT_MAX
authorEric Sandeen <sandeen@sandeen.net>
Sat, 24 Dec 2016 10:07:45 +0000 (18:07 +0800)
committerEryu Guan <eguan@redhat.com>
Sat, 24 Dec 2016 10:09:40 +0000 (18:09 +0800)
commit3cbd329a14bd80596074a38db48ec19321ec4806
treeb274e29100a3e4dbc5b70df3eced0d68a38d854c
parent716691159e4ff2e3aba375a789c62e8c3c73ef6c
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>
src/test-nextquota.c
tests/generic/400 [new file with mode: 0755]
tests/generic/400.out [new file with mode: 0644]
tests/generic/group