On Tue, 2009-02-17 at 23:07 +0100, Jiri Palecek > wrote:
> Hello,
>
> this patch fixes a problem with reporting errors in aio-stress, namely, that
> failure to open a file given on the command line will result in an assertion
> failure rather than an error message. This patch makes it print an error
> message instead.
>
> Regards
> Jiri Palecek
>
> Signed-off-by: Jiri Palecek <[email protected]>
Merged.
Regards--
Subrata
> ---
> testcases/kernel/io/ltp-aiodio/aio-stress.c | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c
> b/testcases/kernel/io/ltp-aiodio/aio-stress.c
> index d71f87b..fc51c68 100644
> --- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
> +++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
> @@ -1470,7 +1470,11 @@ int main(int ac, char **av)
> open_fds++;
>
> rwfd = open(av[i], O_CREAT | O_RDWR | o_direct | o_sync, 0600);
> - assert(rwfd != -1);
> + if(rwfd == -1) {
> + fprintf(stderr, "error while creating file %s: %s", av[i],
> strerror(errno));
> + exit(1);
> + }
> +
>
> oper = create_oper(rwfd, first_stage, j * context_offset,
> file_size - j * context_offset, rec_len,
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list