public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] A new API to get distro name?
@ 2018-05-15  4:03 Zhang, Yixin
  2018-05-15 10:49 ` Cyril Hrubis
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Yixin @ 2018-05-15  4:03 UTC (permalink / raw)
  To: ltp

Hello,

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)

Also in test cpuhotplug07, the folder "/usr/src/linux" doesn't exits on Ubuntu, so some modification based on distro is needed.

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. Thanks. 

Yixin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-16 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-15  4:03 [LTP] A new API to get distro name? Zhang, Yixin
2018-05-15 10:49 ` Cyril Hrubis
2018-05-16 10:05   ` Zhang, Yixin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox