aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-05-10 20:41:08 -0400
committerDave Wallace <dwallacelf@gmail.com>2019-05-17 20:42:10 +0000
commit9673e3e628b01c4ea4ac74a85e42b3686b029ea6 (patch)
treece1f9f40837924fcb144bfbfb0d68f10f1bf182b /src/vnet
parent3bfeff7a9812c025637ee232cca03a6f083bdbc6 (diff)
Tests: Raise exception if API cli_inband command fails.
* Configure tests to raise exception if cli_inband fails. * Fix failing tests. * Add filename detail to pcap.stat clib_error_return for debugging. Note: this change identifies spurious issues with packet-generator such as: CliFailedCommandError: packet-generator capture: pcap file '/tmp/vpp-unittest-Test6RD-v09RPA/pg0_out.pcap' does not exist. These issues resolve themselves on remaining test passes. Change-Id: Iecbd09daee954d892306d11baff3864a43c5b603 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/pg/cli.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/pg/cli.c b/src/vnet/pg/cli.c
index 9c42d70a383..8f82ac1c1f7 100644
--- a/src/vnet/pg/cli.c
+++ b/src/vnet/pg/cli.c
@@ -87,7 +87,8 @@ pg_capture (pg_capture_args_t * a)
{
struct stat sb;
if (stat ((char *) a->pcap_file_name, &sb) != -1)
- return clib_error_return (0, "Cannot create pcap file");
+ return clib_error_return (0, "pcap file '%s' does not exist.",
+ a->pcap_file_name);
}
pi = pool_elt_at_index (pg->interfaces, a->dev_instance);