public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] ltp-aiodio: help aiodio test work normally
Date: Wed, 2 Jun 2021 13:49:52 +0200	[thread overview]
Message-ID: <YLdwYJ3Kw5qf64d2@yuki> (raw)
In-Reply-To: <20210601155427.996321-1-zlang@redhat.com>

Hi!
> ltp aiodio related cmdfiles (runtest/ltp-aio*.part*) can't be used,
> due to they have unfixed path name. Before we run aiodio test, we
> need to create some files (e.g. junkfile), and give it to the tests.
> But current cmdfiles use too many $TMPDIR and aiodio.$$ things, e.g:
> 
>   AD022 time aiocp -b 1k -n 64 -f DIRECT -f SYNC $TMPDIR/aiodio.$$/junkfile $TMPDIR/aiodio.$$/ff2
> 
> TMPDIR is a directory created by `mktemp ${TMPBASE}/ltp-XXXXXXXXXX`,
> it's not a fixed path. The aiodio.$$ is also can be sure before
> running ltp. That cause we can't prepare files in the unfixed path.
> Even the testscripts/ltp-aiodio.sh can't work well either, due to it
> try to create files in $TMP/aiodio/..., the $TMP is $TMPBASE, not
> $TMPDIR, and aiodio is not aiodio.$$.
>
> So this patch trys to help runtest/ltp-aio*.part* to use fixed path
> name, and put all aiodio test related files in $TMPBASE/aiodio/, the
> $TMPBASE is a fixed pathname comes from runltp -d <directory> option.
> So after this fix, users will know where they should create files in,
> no matter running ltp-aiodio.sh or runltp -f runtest/ltp-aio*.part*.

I do not like this solution. I think that we should instead fix the
scripts. I think that the runltp should just export TMPDIR if it was
passed on commandline and it should be the resposibility of the caller
to set up a temporary directory somewhere in /tmp in that case.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2021-06-02 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 15:54 [LTP] [PATCH] ltp-aiodio: help aiodio test work normally Zorro Lang
2021-06-02 11:49 ` Cyril Hrubis [this message]
2021-06-02 18:26   ` Zorro Lang
2021-06-03 13:40     ` Cyril Hrubis

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=YLdwYJ3Kw5qf64d2@yuki \
    --to=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