1 <html> 2 <head> 3 <title>autoltp cookbook</title> 4 5 </head> 6 <body bgcolor="#ffffff" vlink="#800000"> 7 8 <div align="center"><big><big><big><b>LTP Automation<br> 9 using autoltp</b></big></big></big></div> 10 <br> 11 <br> 12 <big><big><b>Prerequisites</b></big></big> 13 <ul> 14 <li>All LTP installation prerequisites must be met<br> 15 </li> 16 <li>Perl modules Net::SFTP and Net::SSH::Perl <b>must</b> be <a 17 href="http://www.cpan.org/misc/cpan-faq.html#How_install_Perl_modules">installed</a> 18 on MASTER machine. (<a href="http://www.cpan.org/">www.cpan.org</a> for instructions/downloads)</li> 19 <li>MASTER and TARGET machines must have sftp and ssh capabilities.<br> 20 </li> 21 <li>IP addresses may replace hostnames in this document if name service 22 is unavailable.<br> 23 </li> 24 25 </ul> 26 <big><big><b>Install files</b></big></big> 27 <ul> 28 <li>Go to <a href="https://github.com/linux-test-project/ltp/releases">GitHub LTP releases</a> 29 and download latest version of LTP</li> 30 <li>Login as root on MASTER machine</li> 31 <li>Untar ltp-xxxxxxxx.tgz in /root</li> 32 33 <ul> 34 <li>tar -xzvf <filename.tgz></li> 35 <li>mv ltp-<yyyymmdd>.tgz ltp <i>(<yyyymmdd> should be replaced 36 with the drop date you are using</i></li> 37 38 </ul> 39 40 </ul> 41 <big><big><b>Setup/Edit config files</b></big></big> 42 <ul> 43 44 <ul> 45 46 </ul> 47 48 </ul> 49 50 <ul> 51 52 <ul> 53 54 </ul> 55 56 </ul> 57 58 <ul> 59 <li>edit runalltests.sh and modify the run line to include the PAN_LOG 60 options:</li> 61 62 <ul> 63 <li>ex: <i>${LTPROOT}/pan/ltp-pan -l $PAN_LOG -e -S $instances $time -a 64 $$ -n $$ -f ${TMP}/alltests</i></li> 65 66 </ul> 67 <li>tar up the ltp directory (<i>this is the ltp.tgz that is copied to 68 the TARGET machines</i>)</li> 69 70 <ul> 71 <li>in the root directory of MASTER type tar -czvf ltp.tgz to tar up 72 the testcases</li> 73 <li>copy the resulting ltp.tgz to /tmp on MASTER (<i>autoltp will look 74 for /ltp.tgz in the tmp directory</i>)<br> 75 </li> 76 77 </ul> 78 79 <ul> 80 81 </ul> 82 83 </ul> 84 85 <ul> 86 87 <ul> 88 89 </ul> 90 91 </ul> 92 <big><big><b>Run LTP</b></big></big><br> 93 94 <ul> 95 <li>cd to /root/ltp/auto on MASTER</li> 96 <li>create a config file that contains the list of hosts (TARGETS) to 97 run LTP against</li> 98 99 <ul> 100 <li>example config file:<br> 101 host1,username,password,number of instances,time<br> 102 host2,username,password,number of instances,time</li> 103 <li>host is the hostname of a TARGET machine<br> 104 </li> 105 <li>username is usually root or a root privileged account</li> 106 <li>number of instances is how many copies of LTP you want running simultaneously</li> 107 <li>time is the duration of the ltp run where 10m = 10 minutes, 2h = 108 2 hours, etc</li> 109 </ul> 110 <li>run ./autoltp -f <config file></li> 111 <li>autoltp will then attempt to make ssh/sftp connections with your TARGET 112 machines and run the LTP testcases<br> 113 </li> 114 </ul> 115 <ul> 116 117 </ul> 118 119 </body> 120 </html> 121