[LTP] [PATCH v4 5/6] syscalls/quotactl09: Test error when quota info hidden in filesystem
xuyang2018.jy@fujitsu.com
xuyang2018.jy@fujitsu.com
Tue Jan 11 07:51:49 CET 2022
Hi Cyril
> Hi!
>>>> + if (tc->exp_err == ENOTBLK)
>>>> + TEST(do_quotactl(fd, tc->cmd, "/dev/null", *tc->id, tc->addr));
>>>> + else
>>>> + TEST(do_quotactl(fd, tc->cmd, tst_device->dev, *tc->id, tc->addr));
>>>
>>> How does this work for the tst_variant == 1? We still do pass the fd
>>> pointing to device right?
>> Yes, but for tst_variant ==1 ,we don't use dev.
>
> Well yes, but the fd points to the device, right?
Yes, we get super block quota info stored in dev by using the fd.
>So we pass a fd that
> points to a device and we expect ENOTBLK if tst_variant == 1 and
> exp_err == ENOTBLK? That does not sound fine, what do I miss?
We skip ENOTBLK error test when tst_variant ==1
if (tst_variant) {
if (tc->exp_err == ENOTBLK) {
tst_res(TCONF, "quotactl_fd() doesn't have this error, skip");
return;
}
}
if (tc->exp_err == ENOTBLK)
TEST(do_quotactl(fd, tc->cmd, "/dev/null", *tc->id, tc->addr));
else
TEST(do_quotactl(fd, tc->cmd, tst_device->dev, *tc->id, tc->addr));
Best Regards
Yang Xu
>
More information about the ltp
mailing list