All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: Petr Vorel <pvorel@suse.cz>
Cc: Dominique Leuenberger <dimstar@opensuse.org>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] swapon03: Swap is not supported on TMPFS on tmpfs
Date: Mon, 5 Feb 2024 15:48:17 +0800	[thread overview]
Message-ID: <CAEemH2dZn4jRjQbEX492uhb4DMHCOMq+C4zvYeq_0N1x8X_mPA@mail.gmail.com> (raw)
In-Reply-To: <20240205022857.191692-2-pvorel@suse.cz>

On Mon, Feb 5, 2024 at 10:29 AM Petr Vorel <pvorel@suse.cz> wrote:

> tst_test.c:1701: TINFO: === Testing on ext4 ===
> tst_test.c:1117: TINFO: Formatting /dev/loop0 with ext4 opts='' extra
> opts=''
> mke2fs 1.47.0 (5-Feb-2023)
> tst_test.c:1131: TINFO: Mounting /dev/loop0 to /tmp/LTP_swanIztq7/mntpoint
> fstyp=ext4 flags=0
> tst_ioctl.c:26: TINFO: FIBMAP ioctl is supported
> swapon03.c:164: TWARN: Failed to create swapfile: swapfile02: EINVAL (22)
> swapon03.c:175: TFAIL: Failed to setup swaps
>
> At least on kernel 6.7.
>
> Fixes: 009a407a0 ("swapon/off: enable all_filesystem in swap test")
> Reported-by: Dominique Leuenberger <dimstar@opensuse.org>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
>  testcases/kernel/syscalls/swapon/swapon03.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/swapon/swapon03.c
> b/testcases/kernel/syscalls/swapon/swapon03.c
> index 3dbcd5bfd..37314cc65 100644
> --- a/testcases/kernel/syscalls/swapon/swapon03.c
> +++ b/testcases/kernel/syscalls/swapon/swapon03.c
> @@ -247,6 +247,9 @@ static void setup(void)
>         if (access("/proc/swaps", F_OK))
>                 tst_brk(TCONF, "swap not supported by kernel");
>
> +       if (tst_fs_type(".") == TST_TMPFS_MAGIC)
> +               tst_brk(TCONF, "swap not supported on tmpfs");
>

I didn't catch the patch point, isn't the failure on EXT4, why here skip
tmpfs?
And, shouldn't the FS check completed in is_swap_supported()?



> +
>         is_swap_supported(TEST_FILE);
>  }
>
> --
> 2.43.0
>
>

-- 
Regards,
Li Wang

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-02-05  7:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05  2:28 [LTP] [PATCH 1/2] swapon03: Cleanup Petr Vorel
2024-02-05  2:28 ` [LTP] [PATCH 2/2] swapon03: Swap is not supported on TMPFS on tmpfs Petr Vorel
2024-02-05  7:48   ` Li Wang [this message]
2024-02-05 11:00     ` Petr Vorel
2024-02-12 19:30       ` Petr Vorel
2024-02-19 10:49         ` Yang Xu (Fujitsu) via ltp
2024-02-19 15:21           ` Petr Vorel

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=CAEemH2dZn4jRjQbEX492uhb4DMHCOMq+C4zvYeq_0N1x8X_mPA@mail.gmail.com \
    --to=liwang@redhat.com \
    --cc=dimstar@opensuse.org \
    --cc=ltp@lists.linux.it \
    --cc=pvorel@suse.cz \
    /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.