From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] A new API to get distro name?
Date: Tue, 15 May 2018 12:49:52 +0200 [thread overview]
Message-ID: <20180515104952.GD7220@rei> (raw)
In-Reply-To: <F8498D2F03F2CF40823E11B9D93AD69F3A4DB22C@SHSMSX101.ccr.corp.intel.com>
Hi!
> I see that some shell tests are sensitive to distro, but not well managed currently.
> Here are some examples I find:
> In test "su01" in scenario "admin_tools", here is the way how it determine the distro (which is incorrect)
> 41 tvar=${MACHTYPE%-*}
> 42 tvar=${tvar#*-}
> 43
> 44 # need to export tvar for su01_s1
> 45 export tvar
> 46 printf "Machine type is: $tvar\n\n"
> 47
> 48 if [ "$tvar" = "redhat" -o "$tvar" = "redhat-linux" ]
> 49 # Need to also set group for TEST_USER2
> Similar for cron/at tests in "admin_tools" (the location of deny/allow file is not at the default location for Ubuntu)
There has been a recent discussion about what command testcases should
be kept in LTP. Since LTP primary focus is on kernel testing, it does
not make much sense to keep broken test for userspace commands.
So we may as well get rid of these three testcases instead of rewriting
them unless somebody really wants to keep them. The whole admin_tools
runtest file consists of broken tests that are at least partially
outside of the focus of LTP.
> Also in test cpuhotplug07, the folder "/usr/src/linux" doesn't exits on Ubuntu, so some modification based on distro is needed.
This should be fixed, the test expects the Linux kernel sources to be
present at /usr/src/linux/ in order to generate system load.
> I'd like to fix them, and need some suggestion: should we add a common
> API in test.sh or should I just fix them in the test cases derectly?
> If we plan to add a common API in the test.sh I may need some help as
> here I don't have all the distro in hand.
Just FYI the test.sh is the old and deprecated test library, the new one
is called tst_test.sh.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2018-05-15 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 4:03 [LTP] A new API to get distro name? Zhang, Yixin
2018-05-15 10:49 ` Cyril Hrubis [this message]
2018-05-16 10:05 ` Zhang, Yixin
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=20180515104952.GD7220@rei \
--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