public inbox for ltp@lists.linux.it
 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] [RFC PATCH 1/1] lib: Print tcnt in tst_{brk,res}()
Date: Mon, 23 Mar 2026 14:29:35 +0100	[thread overview]
Message-ID: <20260323132935.GB323525@pevik> (raw)
In-Reply-To: <ab1bveCpTrEk5jEB@yuki.lan>

> Hi!
> > > > This looks good to me. Maybe we can also color the setup/lib/test
> > > > differently if the output goes into the terminal.


> > > And in order to make it work in the shell as well we would need a
> > > function tst_set_context() that would set the current context so that we
> > > can call it from shell. I suppose that this needs to be designed
> > > carefuly in order to make ti work properly with threads/forked
> > > processes.

> > How about having enum with few states (lib, setup, test, cleanup), which would
> > be switched when context switches (and test_get_state() would just print the
> > string). And test would get the number (idea from this patch).

> > I'm still missing how to call C API code from shell test, because C API code
> > forks child and execute the script, how it could "talk back"?

> Same as the test results the enum would have to be stored in shared
> memory and updated with atomic operations.

Thanks for a hint, I should have figure this myself.

Anyway shell loader uses C API helper tst_res_.c anyway, shared memory is
directly available. But for the iterations (recently discussed) tst_run.sh will
need to have a simple C API helper to get required info.

Kind regards,
Petr

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

      reply	other threads:[~2026-03-23 13:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-18 14:41 [LTP] [RFC PATCH 1/1] lib: Print tcnt in tst_{brk,res}() Petr Vorel
2026-03-20  9:38 ` Andrea Cervesato via ltp
2026-03-20 11:30   ` Petr Vorel
2026-03-20 11:55     ` Cyril Hrubis
2026-03-20 11:59       ` Cyril Hrubis
2026-03-20 14:18         ` Petr Vorel
2026-03-20 14:37           ` Cyril Hrubis
2026-03-23 13:29             ` 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=20260323132935.GB323525@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox