[LTP] [PATCH 1/3] ltp-aiodio: report posix_memalign errors properly
Eryu Guan
eguan@redhat.com
Wed Jun 1 13:09:17 CEST 2016
On Wed, Jun 01, 2016 at 11:27:57AM +0200, Cyril Hrubis wrote:
> Hi!
> > From posix_memalign(3) the value of errno is indeterminate after a call
> > to posix_memalign(). So TERRNO doesn't work in this case.
> > dio_sparse 1 TBROK : dio_sparse.c:75: posix_memalign(): errno=SUCCESS(0): Success
> >
> > Report posix_memalign() errors by calling strerror on the return value.
> > dio_sparse 1 TBROK : dio_sparse.c:74: posix_memalign(): EINVAL
>
> That is good catch but the *_sparse.c and dio_truncate.c does not use
> the test library and hence the compilation fails on undeclared and
> implicit declarations.
Sorry about that! I tested the dio_sparse.c and it worked, but not
others. Lesson learned, thanks for the review!
Eryu
More information about the ltp
mailing list