kvargs: add test case in app/test
authorOlivier Matz <olivier.matz@6wind.com>
Tue, 28 Jan 2014 15:06:44 +0000 (16:06 +0100)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 10:01:14 +0000 (11:01 +0100)
commite495f543552446d8d276f9c80a18f47e96b6d7eb
treed43d8f1c7a738d727d8d0f947341d01a57233bb3
parent38a901702fdfde778d50b2f123c562a66c394f87
kvargs: add test case in app/test

Add a file app/test/test_kvargs.c that checks the rte_kvargs API.
The test passes:

  RTE>>kvargs
  == test valid case ==
  == test invalid case ==
  PMD: Error parsing device, invalid key <wrong-key>
  Test OK

I also tested that rte_eth_pcap runs with the following arguments:

  ./app/testpmd -c 0x15 -n 3 --proc-type=primary --huge-dir=/mnt/huge \
    --use-device="eth_pcap0;iface=ixgbe0" \
    -- -i --port-topology=chained

  ./app/testpmd -c 0x15 -n 3 --proc-type=primary --huge-dir=/mnt/huge \
    --use-device="eth_pcap0;rx_iface=ixgbe0;rx_iface=ixgbe1;tx_iface=ixgbe0" \
    -- -i --port-topology=chained

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
app/test/Makefile
app/test/commands.c
app/test/test.h
app/test/test_kvargs.c [new file with mode: 0644]