All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/3] syscalls/io_destroy: Add io_destroy02 test for native AIO
Date: Mon, 7 Jun 2021 15:15:36 +0200	[thread overview]
Message-ID: <YL4b+J7Cc+i4Bs7w@yuki> (raw)
In-Reply-To: <20210507083321.167998-2-xieziyao@huawei.com>

Hi!
Test looks good but there is one minor problem that has to be solwed,
see below.

> +/*
> + * Copyright (c) Crackerjack Project., 2007
> + * Ported from Crackerjack to LTP by Masatake YAMATO <yamato@redhat.com>
> + * Copyright (c) 2011 Cyril Hrubis <chrubis@suse.cz>
> + * Copyright (c) 2017 Xiao Yang <yangx.jy@cn.fujitsu.com>
> + * Copyright (c) 2021 Xie Ziyao <xieziyao@huawei.com>
> + */
> +
> +/*\
> + * [Description]
> + *
> + * Test io_destroy invoked via syscall(2) with an invalid ctx and expects
> + * it to return EINVAL.
> + */
> +
> +#include <linux/aio_abi.h>
> +
> +#include "config.h"
> +#include "tst_test.h"
> +#include "lapi/syscalls.h"
> +
> +static void verify_io_destroy(void)
> +{
> +	aio_context_t ctx;
> +	memset(&ctx, 0xff, sizeof(ctx));
> +	TST_EXP_FAIL(tst_syscall(__NR_io_destroy, ctx), EINVAL);

This may fail the test if CONFIG_AIO has been disabled in kernel, which
I think is common for embedded tests.

Thinking of solution the easiest fix would probably be to add
.needs_kconfigs with "CONFIG_AIO" to the tst_test structure.

> +}
> +
> +static struct tst_test test = {
> +	.test_all = verify_io_destroy,
> +};
> --
> 2.17.1
> 

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-06-07 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  8:33 [LTP] [PATCH 0/3] syscalls/aio: Add testcases for native AIO Xie Ziyao
2021-05-07  8:33 ` [LTP] [PATCH 1/3] syscalls/io_destroy: Add io_destroy02 test " Xie Ziyao
2021-06-07 13:15   ` Cyril Hrubis [this message]
2021-05-07  8:33 ` [LTP] [PATCH 2/3] syscalls/io_setup: Add io_setup02 " Xie Ziyao
2021-06-07 13:18   ` Cyril Hrubis
2021-05-07  8:33 ` [LTP] [PATCH 3/3] syscalls/io_submit: Add io_submit02 " Xie Ziyao
2021-06-07 13:22   ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YL4b+J7Cc+i4Bs7w@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.