tests.sh 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
  4. # Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
  5. #
  6. # Permission to use, copy, modify, and/or distribute this software for any
  7. # purpose with or without fee is hereby granted, provided that the above
  8. # copyright notice and this permission notice appear in all copies.
  9. #
  10. # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  11. # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  12. # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  13. # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  14. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  15. # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. # PERFORMANCE OF THIS SOFTWARE.
  17. SYSTEMTESTTOP=..
  18. . $SYSTEMTESTTOP/conf.sh
  19. #
  20. # Do glue tests.
  21. #
  22. status=0
  23. n=0
  24. # This query should result in a delegation with two NS; one in the delegated
  25. # zone and one in a so called out-of-bailiwick zone for which the auth server
  26. # has authority, too. For the former, the server should return glue in the
  27. # parent zone. For the latter, BIND 9 and BIND 10 behave differently; BIND 9
  28. # uses "glue" in the parent zone (since this is the root zone everything can
  29. # be considered a valid glue). BIND 10 (using sqlite3 data source) searches
  30. # the other zone and uses the authoritative data in that zone (which is
  31. # intentionally different from the glue in the root zone).
  32. echo "I:testing that a TLD referral gets a full glue set from the root zone ($n)"
  33. $DIG +norec @10.53.0.1 -p 53210 foo.bar.example. A >dig.out.$n || status=1
  34. $PERL $DIGCOMP example.good dig.out.$n || status=1
  35. n=`expr $n + 1`
  36. echo "I:testing that we find glue A RRs we are authoritative for ($n)"
  37. $DIG +norec @10.53.0.1 -p 53210 foo.bar.example.org. a >dig.out.$n || status=1
  38. $PERL $DIGCOMP auth.good dig.out.$n || status=1
  39. n=`expr $n + 1`
  40. # We cannot do this test for BIND 10 because b10-auth doesn't act as a
  41. # recursive (caching) server (by design)
  42. # echo "I:testing that we find glue A/AAAA RRs in the cache ($n)"
  43. # $DIG +norec @10.53.0.1 -p 53210 foo.bar.yy. a >dig.out.$n || status=1
  44. # $PERL $DIGCOMP yy.good dig.out.$n || status=1
  45. # n=`expr $n + 1`
  46. echo "I:testing that we don't find out-of-zone glue ($n)"
  47. $DIG +norec @10.53.0.1 -p 53210 example.net. a > dig.out.$n || status=1
  48. $PERL $DIGCOMP noglue.good dig.out.$n || status=1
  49. n=`expr $n + 1`
  50. # This test currently fails (additional section will be empty, which is
  51. # incorrect). See Trac ticket #646.
  52. #echo "I:testing that we are finding partial out-of-zone glue ($n)"
  53. #$DIG +norec @10.53.0.1 -p 53210 foo.bar.test. a >dig.out.$n || status=1
  54. #$PERL $DIGCOMP test.good dig.out.$n || status=1
  55. #n=`expr $n + 1`
  56. echo "I:exit status: $status"
  57. exit $status