From: Li Wang via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v1 1/2] lib: rename tid to tcid
Date: Thu, 15 May 2025 09:58:54 +0800 [thread overview]
Message-ID: <20250515015855.68510-2-liwang@redhat.com> (raw)
In-Reply-To: <20250515015855.68510-1-liwang@redhat.com>
tcid is better to reflect testcase id, but not mislead developer
to think of thread id (tid).
Signed-off-by: Li Wang <liwang@redhat.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
---
lib/tst_test.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 923ecf7be..451a19eb6 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -55,7 +55,7 @@ const char *TCID __attribute__((weak));
struct tst_test *tst_test;
-static const char *tid;
+static const char *tcid;
static int iterations = 1;
static float duration = -1;
static float timeout_mul = -1;
@@ -106,7 +106,7 @@ static void setup_ipc(void)
if (access("/dev/shm", F_OK) == 0) {
snprintf(shm_path, sizeof(shm_path), "/dev/shm/ltp_%s_%d",
- tid, getpid());
+ tcid, getpid());
} else {
char *tmpdir;
@@ -115,7 +115,7 @@ static void setup_ipc(void)
tmpdir = tst_get_tmpdir();
snprintf(shm_path, sizeof(shm_path), "%s/ltp_%s_%d",
- tmpdir, tid, getpid());
+ tmpdir, tcid, getpid());
free(tmpdir);
}
@@ -1048,7 +1048,7 @@ static void copy_resources(void)
TST_RESOURCE_COPY(NULL, tst_test->resource_files[i], NULL);
}
-static const char *get_tid(char *argv[])
+static const char *get_tcid(char *argv[])
{
char *p;
@@ -1146,7 +1146,7 @@ int tst_creat_unlinked(const char *path, int flags, mode_t mode)
int start[3] = {'0', 'a', 'A'};
snprintf(template, PATH_MAX, "%s/ltp_%.3sXXXXXX",
- path, tid);
+ path, tcid);
len = strlen(template) - 1;
while (template[len] == 'X') {
@@ -1318,7 +1318,7 @@ static void do_setup(int argc, char *argv[])
assert_test_fn();
- TCID = tid = get_tid(argv);
+ TCID = tcid = get_tcid(argv);
if (tst_test->sample)
tst_test = tst_timer_test_setup(tst_test);
--
2.49.0
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2025-05-15 1:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 1:58 [LTP] [PATCH v1 0/2] Refactor test state handling and clarify naming in lib Li Wang via ltp
2025-05-15 1:58 ` Li Wang via ltp [this message]
2025-06-04 9:45 ` [LTP] [PATCH v1 1/2] lib: rename tid to tcid Cyril Hrubis
2025-06-05 2:28 ` Li Wang via ltp
2025-05-15 1:58 ` [LTP] [PATCH v1 2/2] lib: moves test infrastructure states into a shared context structure Li Wang via ltp
2025-05-15 13:16 ` Petr Vorel
2025-06-04 7:04 ` Li Wang via ltp
2025-06-04 11:55 ` Cyril Hrubis
2025-06-05 3:32 ` Li Wang via ltp
2025-06-05 12:40 ` Cyril Hrubis
2025-06-05 6:56 ` 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=20250515015855.68510-2-liwang@redhat.com \
--to=ltp@lists.linux.it \
--cc=liwang@redhat.com \
/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.