| Summary: | devtool selftest assumes 192.168.7.2 | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Richard Purdie <richard.purdie> |
| Component: | devtools / tool chain | Assignee: | Paul Eggleton <bluelightning> |
| Status: | VERIFIED FIXED | QA Contact: | Daniel Istrate <daniel.alexandrux.istrate> |
| Severity: | normal | ||
| Priority: | High | CC: | alexandru.c.georgescu, bluelightning, daniel.alexandrux.istrate, meta.mr.watcher, meta.watcher |
| Version: | 1.8 | ||
| Target Milestone: | 1.9 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
| Bug Depends on: | |||
| Bug Blocks: | 7994, 8176 | ||
|
Description
Richard Purdie
2015-06-27 22:01:23 UTC
Note we have now fixed networking on the autobuilders. This test should figure out which IP address qemu is using though, not hardcode it. How are the tap device(s) and routes setup in the autobuilder setup? Using the runqemu-* scripts or something else?
Do you think it would it be feasible to do something simple like
$ ip route | grep tap | awk '{print $1}'
to get the ip address?
qemurunner.py is how we do this for the runtime tests. The autobuilder devices are setup by runqemu-gen-tapdevs. Unfortunately other QA tests have now copied this code so we have the problem in multiple places. CC'ing Daniel who is also looking at this. I have to take the blame for devtool's QA test, the 192.168.7.2 assumption was very naive; but I'm not sure that the image feature tests copied what was done there - the implementation there is separate. Whatever we come up with in terms of doing this properly they ought to be sharing code though, agreed. However, the other concern here is if we have too many tests that run their own instances of qemu for each test, that's going to be quite a bit of overhead vs. the runtime tests which boot up an instance and then use it for multiple tests. We might be able to reduce that by using kvm instead of the default software emulation in qemu perhaps, but I can't help feeling that there ought to be some kind of bridge between the runtime tests and oe-selftest because the overlap is probably only going to get bigger as time goes on. Hi, If you need to determine the ip address of the qemu machine, you can take a look at it's start sequence and determine the ip address from there. For instanse: daniel@ubuntu-ws:~/poky-test/build$ runqemu qemux86 Continuing with the following parameters: KERNEL: [/home/daniel/poky-test/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin] ROOTFS: [/home/daniel/poky-test/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20150709115504.rootfs.ext4] FSTYPE: [ext4] Acquiring lockfile for tap2... Acquiring lockfile for tap1... Setting up tap interface under sudo Acquiring lockfile for tap0... Running qemu-system-i386... /home/daniel/poky-test/build/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-i386 -kernel /home/daniel/poky-test/build/tmp/deploy/images/qemux86/bzImage-qemux86.bin -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=no,downscript=no -cpu qemu32 -drive file=/home/daniel/poky-test/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86-20150709115504.rootfs.ext4,if=ide,format=raw -show-cursor -usb -usbdevice wacom-tablet -vga vmware -no-reboot -m 256 --append "vga=0 uvesafb.mode_option=640x480-32 root=/dev/hda rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 " On the last line you can see the ip as being ip=192.168.7.2 Determining the tap interface would be to look for this pattern: 'Setting up tap interface under sudo Acquiring lockfile for tap\d+...' --Daniel What do you think about using QemuRunner for running qemu in the selftests, too? That way we could use all it's facilities directly, i.e. QemuRunner.ip et al. (In reply to comment #6) > What do you think about using QemuRunner for running qemu in the selftests, > too? I think that would be a good start, yes. Fix merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=67a3807c4cccc6b258e2e82038f3cdce453e709b http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=69bae0651e393cd5fe4fd196c4d60f4609aef05f http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=76d8c4e97c9dbf9e50d8e73805f77b8404a53caf http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=edc7780ab749534176780a247ab36d4a1575bc30 Fixed with edc7780ab749534176780a247ab36d4a1575bc30 |