[LTP] [PATCH 2/2] syscalls/readdir21: Convert to new API
zhanglianjie
zhanglianjie@uniontech.com
Fri Oct 8 14:42:28 CEST 2021
Hi,
On 2021-10-07 19:54, Cyril Hrubis wrote:
> On Wed, Sep 29, 2021 at 04:32:49PM +0800, zhanglianjie wrote:
>> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
>> -static struct test_case_t {
>> +static struct tcase {
>> unsigned int *fd;
>> struct old_linux_dirent *dirp;
>> unsigned int count;
>> int exp_errno;
>> -} test_cases[] = {
>> +} tcases[] = {
>> {&del_dir_fd, &dirp, sizeof(struct old_linux_dirent), ENOENT},
>> {&file_fd, &dirp, sizeof(struct old_linux_dirent), ENOTDIR},
>> {&invalid_fd, &dirp, sizeof(struct old_linux_dirent), EBADF},
>> -#if !defined(UCLINUX)
>> {&dir_fd, (struct old_linux_dirent *)-1,
>> sizeof(struct old_linux_dirent), EFAULT},
>> -#endif
>> };
>
> I guess that we also miss EINVAL error here with invalid count.
>
The count here is not used, there is no way to test EINVAL.
--
Regards,
Zhang Lianjie
More information about the ltp
mailing list