From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 2/2] swapon03: Try to swapon() as many files until it fails
Date: Tue, 18 Nov 2025 16:04:10 +0100 [thread overview]
Message-ID: <20251118150410.GA49200@pevik> (raw)
In-Reply-To: <20251118143607.45308-3-pvorel@suse.cz>
Hi,
> Previously tst_max_swapfiles() had fine tuning for a specific kernel
> version which was fragile due various backports in enterprise kernels.
> Let's try to create and use as many swap files until swapon() fails.
> Then check for expected EPERM.
> Also test swapon() 2x, first in the setup() when first failure happen,
> then in the test function (easier than propagate errno from fork to the
> main function). Therefore add -i2 into runtest/syscalls.
> It was required to increase cmd_buffer size to avoid directive output
> may be truncated warning.
...
> - /* Determine how many more files are to be created */
> - max_swapfiles = tst_max_swapfiles();
> used_swapfiles = tst_count_swaps();
> - swapfiles = max_swapfiles - used_swapfiles;
> - if (swapfiles > max_swapfiles)
> - swapfiles = max_swapfiles;
> + expected_swapfiles = NUM_SWAP_FILES - used_swapfiles;
And merging this should be followed with removing tst_max_swapfiles()
https://lore.kernel.org/ltp/20251106163500.1063704-5-pvorel@suse.cz/
https://patchwork.ozlabs.org/project/ltp/patch/20251106163500.1063704-5-pvorel@suse.cz/
I forget to add it to v3, therefore I keep this patch opened in patchwork.
I'm sorry for the noise.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-11-18 15:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 14:36 [LTP] [PATCH v3 0/2] swapon03: Try to swapon() as many files until it fails Petr Vorel
2025-11-18 14:36 ` [LTP] [PATCH v3 1/2] swapon03: Remove fork in setup Petr Vorel
2025-11-19 14:57 ` Avinesh Kumar
2025-12-11 10:19 ` Cyril Hrubis
2025-12-11 11:55 ` Petr Vorel
2025-11-18 14:36 ` [LTP] [PATCH v3 2/2] swapon03: Try to swapon() as many files until it fails Petr Vorel
2025-11-18 15:04 ` Petr Vorel [this message]
2025-12-11 11:15 ` Cyril Hrubis
2025-12-19 14:25 ` 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=20251118150410.GA49200@pevik \
--to=pvorel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox