Hi. I encountered a problem running android apk test.
I tried to run Antutu apk-automation test on android device.
(https://github.com/Linaro/test-definitions/tree/master/automated/android/apk...)
This is my job yaml file except device boot action.
device_type: s5p4418-navi-ref-type job_name: s5p4418-navi-ref-all-pass tags: - s5p4418-navi-ref timeouts: job: minutes: 60 action: minutes: 30 connection: minutes: 20 priority: medium visibility: public
protocols: lava-lxc: name: s5p4418-test template: debian distribution: debian release: jessie arch: amd64
actions: - deploy: failure_retry: 3 namespace: tlxc timeout: minutes: 5 to: lxc packages: - wget - zip - unzip - apt os: debian
- boot: namespace: tlxc timeout: minutes: 10 method: lxc prompts: - 'root@(.*):/#' - 'console:/' - ':/'
- test: namespace: tlxc timeout: minutes: 3 failure_retry: 3 definitions: - from: inline name: install-google-fastboot path: inline/install-google-fastboot.yaml repository: metadata: format: Lava-Test Test Definition 1.0 name: install-fastboot description: "Install fastboot provided by google" run: steps: - wget https://dl.google.com/android/repository/platform-tools_r26.0.0-linux.zip - unzip platform-tools_r26.0.0-linux.zip - ln -s `pwd`/platform-tools/fastboot /usr/bin/fastboot - ln -s `pwd`/platform-tools/adb /usr/bin/adb - fastboot --version
- test: namespace: tlxc timeout: minutes: 10 failure_retry: 3 definitions: - repository: https://github.com/Linaro/test-definitions.git from: git path: automated/android/apk-automation/apk-automation.yaml name: antutu6 params: TEST_NAME: antutu6
This is log created when test job create and run lxc container.
|start: 1 lxc-deploy (timeout 00:05:00) [tlxc]||start: 1.1 lxc-create-action (timeout 00:05:00) [tlxc]||nice lxc-create -q -t debian -n s5p4418-test-46 -- --release jessie --packages systemd,systemd-sysv --arch amd64||Container created successfully||end: 1.1 lxc-create-action (duration 00:00:30) [tlxc]||case: lxc-create-action case_id: 541 definition: lava duration: 29.74 extra: ... level: 1.1 namespace: tlxc result: pass http://192.168.1.44/results/testcase/541||start: 1.2 lxc-create-udev-rule-action (timeout 00:04:30) [tlxc]||device info file '/var/lib/lava/dispatcher/tmp/46/lxc-create-udev-rule-action-ymvjdkgm/device-info.yaml' created with: [{'board_id': 's5p4418-navi-ref'}]||udev rules file '/var/lib/lava/dispatcher/tmp/46/lxc-create-udev-rule-action-muvnvu7f/100-lava-s5p4418-test-46.rules' created||ACTION=="add", ATTR{serial}=="s5p4418-navi-ref", RUN+="/usr/share/lava-dispatcher/lava_lxc_device_add.py --lxc-name s5p4418-test-46 --device-node $name --job-id 46 --logging-url tcp://192.168.1.44:5557" ||'/etc/udev/rules.d/100-lava-s5p4418-test-46.rules' symlinked to '/var/lib/lava/dispatcher/tmp/46/lxc-create-udev-rule-action-muvnvu7f/100-lava-s5p4418-test-46.rules'||nice udevadm control --reload-rules||action: lxc-create-udev-rule-action command: ['nice', 'udevadm', 'control', '--reload-rules'] message: Command '['nice', 'udevadm', 'control', '--reload-rules']' returned non-zero exit status 2 output: Command '['nice', 'udevadm', 'control', '--reload-rules']' returned non-zero exit status 2 ||udev rules reloaded.||end: 1.2 lxc-create-udev-rule-action (duration 00:00:00) [tlxc]||start: 1.3 boot-lxc (timeout 00:04:30) [tlxc]||nice lxc-start -n s5p4418-test-46 -d||action: boot-lxc command: ['nice', 'lxc-start', '-n', 's5p4418-test-46', '-d'] message: Command '['nice', 'lxc-start', '-n', 's5p4418-test-46', '-d']' returned non-zero exit status 1 output: lxc-start: tools/lxc_start.c: main: 366 The container failed to start. lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode. lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options. ||Wait until 's5p4418-test-46' state becomes RUNNING||nice lxc-info -sH -n s5p4418-test-46||output: STOPPED||output: ||nice lxc-info -sH -n s5p4418-test-46||output: STOPPED||output: |
I wonder if it is okay to create and run lxc container in docker container.
I wrote job yaml file by reference this job definition.
(https://validation.linaro.org/scheduler/job/1656201/definition)
Best regards
Seoji Kim
On Thu, 7 Feb 2019 at 08:02, tomato seoji@nexell.co.kr wrote:
Hi. I encountered a problem running android apk test.
I tried to run Antutu apk-automation test on android device.
This is log created when test job create and run lxc container.
start: 1 lxc-deploy (timeout 00:05:00) [tlxc]start: 1.1 lxc-create-action (timeout 00:05:00) [tlxc]nice lxc-create -q -t debian -n s5p4418-test-46 -- --release jessie --packages systemd,systemd-sysv --arch amd64Container created successfullyend: 1.1 lxc-create-action (duration 00:00:30) [tlxc]case: lxc-create-action case_id: 541 definition: lava duration: 29.74 extra: ... level: 1.1 namespace: tlxc result: pass http://192.168.1.44/results/testcase/541start: 1.2 lxc-create-udev-rule-action (timeout 00:04:30) [tlxc]device info file '/var/lib/lava/dispatcher/tmp/46/lxc-create-udev-rule-action-ymvjdkgm/device-info.yaml' created with: [{'board_id': 's5p4418-navi-ref'}]udev rules file '/var/lib/lava/dispatcher/tmp/46/lxc-create-udev-rule-action-muvnvu7f/100-lava-s5p4418-test-46.rules' createdACTION=="add", ATTR{serial}=="s5p4418-navi-ref", RUN+="/usr/share/lava-dispatcher/lava_lxc_device_add.py --lxc-name s5p4418-test-46 --device-node $name --job-id 46 --logging-url tcp:// 192.168.1.44:5557" '/etc/udev/rules.d/100-lava-s5p4418-test-46.rules' symlinked to '/var/lib/lava/dispatcher/tmp/46/lxc-create-udev-rule-action-muvnvu7f/100-lava-s5p4418-test-46.rules'nice udevadm control --reload-rulesaction: lxc-create-udev-rule-action command: ['nice', 'udevadm', 'control', '--reload-rules'] message: Command '['nice', 'udevadm', 'control', '--reload-rules']' returned non-zero exit status 2 output: Command '['nice', 'udevadm', 'control', '--reload-rules']' returned non-zero exit status 2 udev rules reloaded.end: 1.2 lxc-create-udev-rule-action (duration 00:00:00) [tlxc]start: 1.3 boot-lxc (timeout 00:04:30) [tlxc]nice lxc-start -n s5p4418-test-46 -daction: boot-lxc command: ['nice', 'lxc-start', '-n', 's5p4418-test-46', '-d'] message: Command '['nice', 'lxc-start', '-n', 's5p4418-test-46', '-d']' returned non-zero exit status 1 output: lxc-start: tools/lxc_start.c: main: 366 The container failed to start. lxc-start: tools/lxc_start.c: main: 368 To get more details, run the container in foreground mode. lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options. Wait until 's5p4418-test-46' state becomes RUNNINGnice lxc-info -sH -n s5p4418-test-46output: STOPPEDoutput: nice lxc-info -sH -n s5p4418-test-46output: STOPPEDoutput:
I wonder if it is okay to create and run lxc container in docker container.
LXC does not operate inside Docker. You need to install the lav-lxc-mocker package inside the docker (the official docker images already have it installed) to prevent LXC operations being attempted.
https://packages.debian.org/unstable/lava-lxc-mocker
Which Docker image are you using? In future, please attach the FULL logs and avoid pasting the content into the body of the email. Use the download link to get the YAML which contains additional information like the timestamps.
We do not yet have fully working examples of driving android devices in LAVA from Docker. At this point, I would recommend that you do not attempt to run android test jobs using a LAVA worker running inside Docker. You will need to install lava-dispatcher on a Debian system, as we currently use for all android test jobs.
On Thu, 7 Feb 2019 at 08:57, Neil Williams neil.williams@linaro.org wrote:
We do not yet have fully working examples of driving android devices in LAVA from Docker. At this point, I would recommend that you do not attempt to run android test jobs using a LAVA worker running inside Docker. You will need to install lava-dispatcher on a Debian system, as we currently use for all android test jobs.
with lava-lxc-mocker you will get this working (I have it working in my local setup). However you need to be aware of 2 things: - you're running host part of your test inside debian docker container (Android tools often assume they run on ubuntu) - software that is installed inside container during the job stays there. So unlike lxc on bare metal instance you might hit the issues with persistence.
Apart from that lava-lxc-mocker does the trick.
milosz
--
Neil Williams
neil.williams@linaro.org http://www.linux.codehelp.co.uk/ _______________________________________________ Lava-users mailing list Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users
lava-users@lists.lavasoftware.org