All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 5/5] swapon03: Remove grep dependency
Date: Tue, 18 Nov 2025 13:41:51 +0100	[thread overview]
Message-ID: <20251118124151.GA29577@pevik> (raw)
In-Reply-To: <aRc-y_W0StnungVp@yuki.lan>

> Hi!
> > Do you mean to use full swap file path from /proc/mounts, i.e.
> > /tmp/LTP_swaNzeMJr/mntpoint/testswap, /tmp/LTP_swamEVVAc/mntpoint/testswap03,
> > ... (example from run which created /tmp/LTP_swamEVVAc with all swap files,
> > cleanup interrupted by ctrl+C and following one which created /tmp/LTP_swaNzeMJr
> > single swap file only):

> If we make the swapfile names unique enough we can match just that
> instead. I think one of the patches did just that by including the test
> name in the swap filenames. If we want to be extra sure we can take last
> directory component of the test temporary directory as well.

FYI the problem I wanted to address here was during repeatedly running this test
(swapon03.c) during debugging. Therefore $TMPDIR directory component would help
or $PID would help in this case (but sure the test name itself would help in
possible clash of 2 different tests). I'll probably implement it by $TMPDIR
subset unless you see any usefulness of normalizing $TMPDIR.

But I'll postpone it, in v3 I'll just remove fork and "Try to swapon() as many
files until it fails" to get the original problem merged first.

> What I'm
> trying to point out is that the $TMPDIR part of the test temporary
> directory is not adding anything unique to the path since that is prefix
> that is used by all LTP tests.

Understand. FYI I added the full path to the file to avoid the need to create
full path from subset of the path. I'll probably go this way, although I still
think more tests expect normalized path to TMPDIR, but we don't normalize it
nor even check for it (it'd be interesting to see how many tests in
runtest/syscalls will fail with TMPDIR=/run/../tmp or TMPDIR=/tmp///).

Kind regards,
Petr

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

      reply	other threads:[~2025-11-18 12:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-06 16:34 [LTP] [PATCH v2 0/5] swapon03: Try to swapon() as many files until it fails Petr Vorel
2025-11-06 16:34 ` [LTP] [PATCH v2 1/5] swapon03: Don't create swap file twice Petr Vorel
2025-11-11 12:52   ` Cyril Hrubis
2025-11-11 15:24     ` Petr Vorel
2025-11-06 16:34 ` [LTP] [PATCH v2 2/5] swapon03: Cleanup Petr Vorel
2025-11-11 13:04   ` Cyril Hrubis
2025-11-11 15:47     ` Petr Vorel
2025-11-06 16:34 ` [LTP] [PATCH v2 3/5] swapon03: Try to swapon() as many files until it fails Petr Vorel
2025-11-07  3:15   ` Li Wang via ltp
2025-11-11 13:07   ` Cyril Hrubis
2025-11-11 15:58     ` Petr Vorel
2025-11-11 16:03       ` Petr Vorel
2025-11-06 16:34 ` [LTP] [PATCH v2 4/5] libswap: Remove now unused tst_max_swapfiles() Petr Vorel
2025-11-06 16:35 ` [LTP] [PATCH v2 5/5] swapon03: Remove grep dependency Petr Vorel
2025-11-07 16:27   ` Avinesh Kumar
2025-11-14 10:24     ` Petr Vorel
2025-11-14 10:27       ` Cyril Hrubis
2025-11-14 12:09         ` Petr Vorel
2025-11-14 14:38           ` Cyril Hrubis
2025-11-18 12:41             ` Petr Vorel [this message]

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=20251118124151.GA29577@pevik \
    --to=pvorel@suse.cz \
    --cc=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.