This file is indexed.

/usr/share/doc/lava-server-doc/html/hacking-session.html is in lava-server-doc 2014.09.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>LAVA Hacking Sessions &mdash; LAVA Server 2014.09.1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2014.09.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/favicon.ico"/>
    <link rel="top" title="LAVA Server 2014.09.1 documentation" href="index.html" />
    <link rel="next" title="Multi-Node LAVA" href="multinode.html" />
    <link rel="prev" title="LAVA Test Shell" href="lava_test_shell.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="multinode.html" title="Multi-Node LAVA"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="lava_test_shell.html" title="LAVA Test Shell"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">LAVA Server 2014.09.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="lava-hacking-sessions">
<h1>LAVA Hacking Sessions<a class="headerlink" href="#lava-hacking-sessions" title="Permalink to this headline"></a></h1>
<p>A LAVA hacking session is a lava-test-shell test that provides remote
ssh access to a LAVA device.</p>
<div class="section" id="assumptions">
<h2>Assumptions<a class="headerlink" href="#assumptions" title="Permalink to this headline"></a></h2>
<blockquote>
<div><ul class="simple">
<li>The user has TCP/IP access to the device</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="parameters">
<h2>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline"></a></h2>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">GATEWAY</span></tt> - The gateway for the network the target device is on
(check with your LAVA admins)</li>
<li><tt class="docutils literal"><span class="pre">PUB_KEY</span></tt> - A plain-text string containing the ssh public key(s) you
wish to use to connect to the device over ssh</li>
<li>testdef - The test definition (distrbution specific)</li>
</ul>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="https://git.linaro.org/lava-team/hacking-session.git/blob_plain/HEAD:/hacking-session-debian.yaml">hacking-session-debian.yaml</a> - run the hacking session on a
Debian or Ubuntu filesystem, <strong>openssh-server will be installed
using the package manager</strong> if not already installed. The test
image <strong>must</strong> raise a network interface automatically.</li>
<li><a class="reference external" href="https://git.linaro.org/lava-team/hacking-session.git/blob_plain/HEAD:/hacking-session-oe.yaml">hacking-session-oe.yaml</a> - run the hacking session on an Open
Embedded filesystem. <strong>openssh-server must be installed in
the test image</strong></li>
<li><strong>hacking-session-android.yaml</strong> - run the hacking session on an
Android filesystem <strong>openssh-server must be installed in the
test image</strong>. (The YAML for this session is still in review).</li>
</ul>
</div></blockquote>
</div></blockquote>
</div>
<div class="section" id="starting-a-hacking-session">
<h2>Starting a Hacking Session<a class="headerlink" href="#starting-a-hacking-session" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li>Create a LAVA job file with your desired target and image</li>
<li>Add a lava-test-shell action to your LAVA json job file where you want hacking access</li>
</ul>
<div class="highlight-python"><div class="highlight"><pre><span class="p">{</span>
    <span class="s">&quot;command&quot;</span><span class="p">:</span> <span class="s">&quot;lava_test_shell&quot;</span><span class="p">,</span>
    <span class="s">&quot;parameters&quot;</span><span class="p">:</span> <span class="p">{</span>
        <span class="s">&quot;testdef_repos&quot;</span><span class="p">:</span> <span class="p">[</span>
            <span class="p">{</span>
                <span class="s">&quot;git-repo&quot;</span><span class="p">:</span> <span class="s">&quot;http://git.linaro.org/lava-team/hacking-session.git&quot;</span><span class="p">,</span>
                <span class="s">&quot;testdef&quot;</span><span class="p">:</span> <span class="s">&quot;hacking-session-debian.yaml&quot;</span><span class="p">,</span>
                <span class="s">&quot;parameters&quot;</span><span class="p">:</span> <span class="p">{</span>
                    <span class="s">&quot;GATEWAY&quot;</span><span class="p">:</span> <span class="s">&quot;10.0.0.1&quot;</span><span class="p">,</span>
                    <span class="s">&quot;PUB_KEY&quot;</span><span class="p">:</span> <span class="s">&quot;PASTE_PUBKEY(S) HERE&quot;</span>
                <span class="p">}</span>
            <span class="p">}</span>
        <span class="p">],</span>
        <span class="s">&quot;timeout&quot;</span><span class="p">:</span> <span class="mi">3600</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The session <strong>will not end</strong> simply because you log out. Always
use the commands for <a class="reference internal" href="#stop-hacking"><em>Stopping a Hacking Session</em></a> so that the device is
returned to the pool for other users to use as soon as you
have finished with your hacking session.</p>
</div>
</div>
<div class="section" id="connecting-to-a-hacking-session">
<h2>Connecting to a Hacking Session<a class="headerlink" href="#connecting-to-a-hacking-session" title="Permalink to this headline"></a></h2>
<p>The hacking session test definition will report the commands to ssh within the
LAVA log file.  To access the log file, you can use a web browser; navigate to
your hacking session and scroll to the end of the job to see instructions</p>
<blockquote>
<div><ul class="simple">
<li>This hack session was executed on Linaro&#8217;s LAVA system, job ID: 116632</li>
</ul>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="https://validation.linaro.org/scheduler/job/116632/log_file#L_5_7">https://validation.linaro.org/scheduler/job/116632/log_file#L_5_7</a></li>
</ul>
</div></blockquote>
</div></blockquote>
<div class="section" id="ssh-tunneling">
<h3>SSH tunneling<a class="headerlink" href="#ssh-tunneling" title="Permalink to this headline"></a></h3>
<p>If your target device is located on a remote server, as is the case when
accessing the Linaro LAVA lab, you&#8217;ll want to tunnel onto the Linaro network
to the device under test</p>
<ol class="arabic">
<li><p class="first">verify your SSH key is setup and configured to connect:</p>
<div class="highlight-python"><div class="highlight"><pre>~# ssh -T username@example.com
</pre></div>
</div>
</li>
<li><p class="first">Modify your SSH config to allow agent forwarding:</p>
<div class="highlight-python"><div class="highlight"><pre>Host example.com
   ForwardAgent yes
</pre></div>
</div>
</li>
</ol>
</div>
<div class="section" id="lava-test-shell-helper-functions-in-a-hack-session">
<h3>lava-test-shell helper functions in a hack session<a class="headerlink" href="#lava-test-shell-helper-functions-in-a-hack-session" title="Permalink to this headline"></a></h3>
<p>lava-test-shell helper functions can be found within target in the
directory <tt class="docutils literal"><span class="pre">/lava/bin</span></tt></p>
</div>
<div class="section" id="record-text-to-the-lava-log">
<h3>Record text to the LAVA log<a class="headerlink" href="#record-text-to-the-lava-log" title="Permalink to this headline"></a></h3>
<p>During a hacking session, LAVA is listening to <tt class="docutils literal"><span class="pre">/dev/ttyS0</span></tt> for the
duration of the hacking session.  From within the target any text you
echo to <tt class="docutils literal"><span class="pre">/dev/ttyS0</span></tt> will be recorded within LAVA.</p>
<blockquote>
<div><ul>
<li><p class="first">From within the Test session:</p>
<div class="highlight-python"><div class="highlight"><pre>root@kvm01:~# echo &quot;This is a test statement&quot; &gt; /dev/ttyS0
</pre></div>
</div>
</li>
<li><p class="first">Viewing the output in the LAVA log</p>
<p><a class="reference external" href="https://validation.linaro.org/scheduler/job/116632/log_file#L_5_12">https://validation.linaro.org/scheduler/job/116632/log_file#L_5_12</a></p>
</li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="stopping-a-hacking-session">
<span id="stop-hacking"></span><h2>Stopping a Hacking Session<a class="headerlink" href="#stopping-a-hacking-session" title="Permalink to this headline"></a></h2>
<p>During a hacking session, the target your are connected to can&#8217;t be used for
other tasks, to complete your session</p>
<blockquote>
<div><ul class="simple">
<li>Cancel the job in the LAVA using the link in the job detail or
job log pages.</li>
<li>Use the helper function <tt class="docutils literal"><span class="pre">stop_hacking</span></tt> from the command-line
within the hacking session</li>
</ul>
</div></blockquote>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/linaro.png" alt="Logo"/>
            </a></p>
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">LAVA Hacking Sessions</a><ul>
<li><a class="reference internal" href="#assumptions">Assumptions</a></li>
<li><a class="reference internal" href="#parameters">Parameters</a></li>
<li><a class="reference internal" href="#starting-a-hacking-session">Starting a Hacking Session</a></li>
<li><a class="reference internal" href="#connecting-to-a-hacking-session">Connecting to a Hacking Session</a><ul>
<li><a class="reference internal" href="#ssh-tunneling">SSH tunneling</a></li>
<li><a class="reference internal" href="#lava-test-shell-helper-functions-in-a-hack-session">lava-test-shell helper functions in a hack session</a></li>
<li><a class="reference internal" href="#record-text-to-the-lava-log">Record text to the LAVA log</a></li>
</ul>
</li>
<li><a class="reference internal" href="#stopping-a-hacking-session">Stopping a Hacking Session</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="lava_test_shell.html"
                        title="previous chapter">LAVA Test Shell</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="multinode.html"
                        title="next chapter">Multi-Node LAVA</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/hacking-session.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="multinode.html" title="Multi-Node LAVA"
             >next</a> |</li>
        <li class="right" >
          <a href="lava_test_shell.html" title="LAVA Test Shell"
             >previous</a> |</li>
        <li><a href="index.html">LAVA Server 2014.09.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010-2014, Linaro Limited.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>