c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews#!/bin/sh
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews#
dce54b9b5cfa450570fe9c11644450aeb3ee89f3Tinderbox User# Copyright (C) 2013, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark AndrewsSYSTEMTESTTOP=..
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews. $SYSTEMTESTTOP/conf.sh
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsstatus=0
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsecho "I:test name to long"
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews$PERL formerr.pl -a 10.53.0.1 -p 5300 nametoolong > nametoolong.out
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsans=`grep got: nametoolong.out`
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsif [ "${ans}" != "got: 000080010000000000000000" ];
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsthen
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews echo "I:failed"; status=`expr $status + 1`;
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsfi
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsecho "I:two questions"
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews$PERL formerr.pl -a 10.53.0.1 -p 5300 twoquestions > twoquestions.out
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsans=`grep got: twoquestions.out`
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsif [ "${ans}" != "got: 000080010000000000000000" ];
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsthen
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews echo "I:failed"; status=`expr $status + 1`;
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsfi
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
ce67023ae3ad39a77da5361d0187ab6f3f0219cbMark Andrews# this one is now NOERROR
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsecho "I:no questions"
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews$PERL formerr.pl -a 10.53.0.1 -p 5300 noquestions > noquestions.out
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsans=`grep got: noquestions.out`
ce67023ae3ad39a77da5361d0187ab6f3f0219cbMark Andrewsif [ "${ans}" != "got: 000080000000000000000000" ];
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsthen
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews echo "I:failed"; status=`expr $status + 1`;
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsfi
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrewsecho "I:exit status: $status"
c07c2a862e0f9d671e2961cd179c7b28d7b04f10Mark Andrews
3635d8f9104e70e141a8f191a0e6c1502ceed2f3Mark Andrews[ $status -eq 0 ] || exit 1