libbsd.txt "test runner" realview_pbx_a9_qemu

Gene Smith gds at chartertn.net
Mon Jun 8 21:46:34 UTC 2015


On 06/06/2015 09:21 PM, Chris Johns wrote:
> On 6/06/2015 2:19 pm, Gene Smith wrote:
>> On 06/05/2015 11:45 PM, Chris Johns wrote:
>>> Great. Is this with the latest RSB ? I committed some changes to build
>>> qemu with VDE support and I would love feedback about this change.
>>
>> Just did a pull to the latest. Was 4 commits back. Does the vde support
>> require just a rebuild of qemu? Or does it require the toolchain also be
>> rebuilt?
>>
>
> Just rebuild qemu. It might pay to check the RSB log file by searching
> for vde to make sure the RSB and qemu have found the vde libraries.

Yes, the rsb log for building qemu indicated *no* vde support. So I 
obtained and make/installed "vde2" from soureforge since there is no vde 
package in fedora. Now the log indicates vde supported after qemu 
rebuild via rsb.

>
>> Also, how do you run these vde tests?
>
> I am still playing with VDE to figure it all out. Basically create a
> vde_switch and connect it to a tap interface. Set the group and mod if
> you want to handle security. The man has the details. Start qemu with
> '-net vde,sock=/tmp/vde.ctl' or the path to the control port the
> vde_switch makes.

I did this:
sudo /usr/local/bin/vde_switch -F --tap tap0 -sock /tmp/myswitch
and I see new the tap interface:
[gene at hplt ~]$ ifconfig -a
tap0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
         ether 52:4b:a3:d2:f4:08  txqueuelen 500  (Ethernet)
         RX packets 3  bytes 159 (159.0 B)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 0  bytes 0 (0.0 B)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Running qemu I get this:
[gene at hplt ~]$ qemu-system-arm
qemu-system-arm: error while loading shared libraries: libvdeplug.so.3: 
cannot open shared object file: No such file

Fix with this (since vde2 default installs libs in non-fedora place, I 
assume):
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Ping01 test seems "easy" but when I run it I see this:

[gene at hplt ping01]$ sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 
/home/gene/rtems/install/4.11/qemu/bin/qemu-system-arm -M 
realview-pbx-a9 -m 256M -no-reboot -monitor none -serial stdio 
-nographic -net vde,sock=/tmp/myswitch -kernel ping01.exe
audio: Could not init `oss' audio driver
Warning: vlan 0 with no nics
*** LIBBSD PING 1 TEST ***
nexus0: <RTEMS Nexus device>
devctl: ? at   on nexus0
devctl: +nexus0 at   on root0
devctl: !system=IFNET subsystem=lo0 type=ATTACH
ifconfig: interface smc0 does not exist
assertion "exit_code == EX_OK" failed: file 
"testsuite/include/rtems/bsd/test/default-network-init.h", line 123, 
function: default_network_ifconfig_hwif0

Obviously, I am doing something very wrong or incomplete here! FYI, the 
config.inc file I used to build rtems-libbsd is attached. (Also, I am 
still needing root access.)

-gene


>
> I like the idea of VDE because you can have a 32 port virtual switch
> which means parallel network testing using qemu. Plus it is done without
> root access.
>
> Chris
>

-------------- next part --------------
# Mandatory: Select your BSP and installation prefix
TARGET = arm-rtems4.11
BSP = realview_pbx_a9_qemu
#PREFIX = /opt/rtems-4.11
PREFIX = ${HOME}/rtems/install/4.11/$(BSP)

# Optional: Separate installation base directory
INSTALL_BASE = $(PREFIX)/$(TARGET)/$(BSP)

# Optional: Network test configuration
TEST_RUNNER = ${HOME}/rtems/rtems-testing/sim-scripts/$(BSP)
#NET_CFG_SELF_IP = 10.0.2.1
#NET_CFG_NETMASK = 255.255.0.0
#NET_CFG_PEER_IP = 192.168.100.11
#NET_CFG_GATEWAY_IP = 192.168.100.11
NET_CFG_SELF_IP = 192.168.1.132 
NET_CFG_NETMASK = 255.255.0.0
NET_CFG_PEER_IP = 192.168.1.1
NET_CFG_GATEWAY_IP = 192.168.1.1
NET_TAP_INTERFACE = tap0


More information about the users mailing list