All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 3/4] shell lib: Add basic support for test setup
Date: Fri, 2 May 2025 11:36:23 +0200	[thread overview]
Message-ID: <aBSSF8bPjoKz8Umx@yuki.lan> (raw)
In-Reply-To: <20250430130417.43523-4-pvorel@suse.cz>

Hi!
> test.sh
>   . tst_env.sh
>   . tst_loader.sh
>     tst_run_shell test.sh
>       . tst_env.sh
>       . tst_loader.sh

Maybe we can even simplify this a bit more if we move the part that
calls the tst_run_shell before we parse the whole shell test.

I guess that this would work:

test.sh
  . tst_loader.sh
    tst_run_shell test.sh
    . tst_loader.sh
      . tst_env.sh
    . tst_run.sh


 And the tst_loader.sh would be untouched and the code you are adding to
 tst_loader.sh in this patch would go to the tst_run.sh.

 That way we would include tst_env.sh in the tst_loader.sh on it's
 second invocation, parse the shell test code and finally in tst_run.sh
 setup the cleanup trap, call the setup and run the actual test.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2025-05-02  9:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 13:04 [LTP] [PATCH v2 0/4] shell loader rewrite to support TST_SETUP Petr Vorel
2025-04-30 13:04 ` [LTP] [PATCH v2 1/4] shell lib: Add support for test cleanup Petr Vorel
2025-04-30 13:04 ` [LTP] [PATCH v2 2/4] shell: Move shell code into functions Petr Vorel
2025-05-02  9:26   ` Cyril Hrubis
2025-04-30 13:04 ` [LTP] [PATCH v2 3/4] shell lib: Add basic support for test setup Petr Vorel
2025-05-02  9:36   ` Cyril Hrubis [this message]
2025-04-30 13:04 ` [LTP] [PATCH v2 4/4] shell: Add shell_loader_setup_cleanup.sh test Petr Vorel
2025-05-02  8:51 ` [LTP] [PATCH v2 0/4] shell loader rewrite to support TST_SETUP Cyril Hrubis
2025-05-06 22:04   ` 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=aBSSF8bPjoKz8Umx@yuki.lan \
    --to=chrubis@suse.cz \
    --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.