#!/bin/bash
#
# Execute test case for LLDPAD testing according to IEEE 802.1Qbg
#
# Copyright (c) International Business Machines Corp., 2014
#
# Author(s): Thomas Richter <tmricht at linux.vnet.ibm.com>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
#

#
# Thomas Richter, IBM Research & Development, Boeblingen, Germany, 16-Aug-2013
# Check of lldpad did start the ecp module, it shound not.

# Note first parameter is the test case number
tfile=/tmp/$1-lldpad.conf.out

echo "check for ecp22 module not started"

if [ ! -r $tfile ]
then
	echo "lldpad trace file not readable"
	exit 126
fi

if fgrep -q 'ecp22_start:veth0' $tfile
then
	echo "error ecp22 module started"
	exit 125
fi

echo SUCCESS
exit 0
