On Wed, 26 Apr 2017 14:53:41 -0700
Lisa Nguyen <[email protected]> wrote:

> On 20 April 2017 at 02:57, Neil Williams <[email protected]> wrote:
> > On Tue, 18 Apr 2017 12:13:01 -0700
> > Lisa Nguyen <[email protected]> wrote:
> >  
> >> Hi Dave,
> >>
> >> On 12 April 2017 at 08:09, Dave Pigott <[email protected]>
> >> wrote:  
> >> > Hi Lisa,
> >> >
> >> > I need to fix the device dict based on some things that Neil did.
> >> >
> >> > Still on my radar.  
> >
> > https://pmwg.validation.linaro.org/scheduler/job/1405#L385
> >
> > This problem is now fixed. For reference, USB devices which show a
> > serial number which includes forward slash / will have that slash
> > replaced by an underscore when processed through pyudev. The device
> > dictionary has been updated for pmwg panda-01. A documentation fix
> > is in preparation.
> >
> > (BTW 2017.4 includes NFS support for panda, so I used that in my
> > test job, your ramdisk test job will work too.)  
> 
> Thanks for looking into this, Neil.
> 
> I wrote a test definition to build, install, and run the arm-probe
> command-line tool in LAVA, but I'm running into the error where the
> probe path cannot be accessed without running into the 'exclusive'
> error:
> https://pmwg.validation.linaro.org/scheduler/job/1489#L3776

OK, I've identified what is wrong here. LAVA is only adding devices from
the 'usb' subsystem to the LXC but the energy probe software needs the
'tty' element instead or as well.

I've tried to use mknod to create the device within the LXC but LXC
itself seems to do extra work to allow programs like minicom to use the
device. In local tests, I can't get minicom to be happy with ttyUSB0
created using mknod inside the LXC, even thought the device looks the
same as it is outside the LXC. Using lxc-device add works with minicom.
(I'm testing with a usb serial device connected to a BBB rather than an
energy probe but I'm hoping the energy probe code is essentially doing
the same operations as minicom.)

So this will need a code change (which I've already prepared) to find
the tty device node and pass that to lxc-device add. We are looking to
release 2017.5 relatively soon - once we have had time to do full
testing on staging after the much needed reorganisation of
staging.validation.linaro.org. (The re-org includes the provision of
devices with energy probes attached, so we can include checks on this
functionality in future releases.)

> In a manual setting, I expect to see output similar to this:
> 
> # configuration: config-panda-lab
> # config_name: pandaboard
> # trigger: 0.400000V (hyst 0.200000V) 0.000000W (hyst 0.200000W) 400us
> Configuration: pandaboard
> # date: Wed, 26 Apr 2017 22:47:59 +0100
> # host: pmwg-server-01.pmwglab
> #
> + /dev/serial/by-id/usb-NXP_SEMICOND_ARM_Energy_Probe_S_NO44440001-if00
> Starting...
> sending start to 0
> # VDD_ALL VDD ROOT #ff0000 SoC
> #
> #
> time  VDD(V) VDD(A) VDD(W)
> 0.000500  5.19 0.0994 0.51568
> 0.000600  5.19 0.0704 0.36538
> 0.000700  5.19 0.0994 0.51538
> 0.000800  5.19 0.0764 0.39608
> 0.000900  5.20 0.0654 0.33967
> 0.001000  5.19 0.0934 0.48444
> 0.001100  5.19 0.0754 0.39097
> 0.001200  5.19 0.0734 0.38052
> ...
> ...
> 
> However, I was able to verify that the LXC detected the probe by
> writing an inline test definition to use the lsusb command:
> https://pmwg.validation.linaro.org/scheduler/job/1489#L2049
> 
> >>
> >> As we discussed during our sync, the device dictionary looks
> >> correct, yet I'm not sure if the probe is detected inside the LXC.
> >> I ran another job and it's the same result as the previous one I
> >> posted in this thread.
> >>
> >> Also I don't know how USB devices are listed inside LXCs, but I
> >> would expect to see something like /dev/bus/usb/***, /dev/ttyUSB*,
> >> or /dev/ttyS*.
> >>
> >> Can you check to see if I'm overlooking something in the log below?
> >> https://pmwg.validation.linaro.org/scheduler/job/1389#L1030
> >>  
> >> > Dave
> >> >
> >> > On 12 Apr 2017, at 16:08, Lisa Nguyen <[email protected]>
> >> > wrote:
> >> >
> >> > On 19 March 2017 at 22:10, Senthil Kumaran S
> >> > <[email protected]> wrote:
> >> >
> >> > Hi Lisa,
> >> >
> >> > On Saturday 18 March 2017 12:49 AM, Lisa Nguyen wrote:
> >> >
> >> > After re-running a sample test job[1] to test AEP support, I
> >> > noticed that the usb path to the probe for the pandaboard was
> >> > not detected in the container anymore:
> >> >
> >> > https://pmwg.validation.linaro.org/scheduler/job/997#L1014
> >> >
> >> > To verify that the /dev/usb/ directory didn't exist, I tweaked
> >> > the test job a little to check the contents of /dev inside lxc
> >> > and ran it again:
> >> >
> >> >
> >> > This has quite changed in 2017.2 as a result of
> >> > https://projects.linaro.org/browse/LAVA-814
> >> >
> >> > We do not use the symlink provided by udev rules anymore, instead
> >> > we use the device_info parameter from device dictionary. See
> >> > https://staging.validation.linaro.org/static/docs/v2/admin-lxc-deploy.html#android-testing-with-lxc-support
> >> > for how to use device_info.
> >> >
> >> > In order to use the above the panda device dictionary should be
> >> > updated.
> >> >
> >> >
> >> > I see that the device dictionary got updated with device_info
> >> > added.
> >> >
> >> > I'm not sure if I see the path of the probe under /dev unless I'm
> >> > missing something in the job definition?
> >> > https://pmwg.validation.linaro.org/scheduler/job/1335#L1051
> >> >
> >> > Thank You.
> >> > --
> >> > Senthil Kumaran
> >> > http://www.stylesen.org/
> >> > http://www.sasenthilkumaran.com/
> >> >
> >> > _______________________________________________
> >> > linaro-validation mailing list
> >> > [email protected]
> >> > https://lists.linaro.org/mailman/listinfo/linaro-validation
> >> >
> >> >  
> >> _______________________________________________
> >> linaro-validation mailing list
> >> [email protected]
> >> https://lists.linaro.org/mailman/listinfo/linaro-validation  
> >
> >
> > --
> >
> >
> > Neil Williams
> > =============
> > http://www.linux.codehelp.co.uk/
> >  


-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpC2joTNrqNZ.pgp
Description: OpenPGP digital signature

_______________________________________________
linaro-validation mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/linaro-validation

Reply via email to