tests.sh 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. # Disabling this test, as it checks for looking up glue in a different zone
  37. # finder than the answer is from. This is not supported now.
  38. #echo "I:testing that we find glue A RRs we are authoritative for ($n)"
  39. #$DIG +norec @10.53.0.1 -p 53210 foo.bar.example.org. a >dig.out.$n || status=1
  40. #$PERL $DIGCOMP auth.good dig.out.$n || status=1
  41. #n=`expr $n + 1`
  42. # We cannot do this test for BIND 10 because b10-auth doesn't act as a
  43. # recursive (caching) server (by design)
  44. # echo "I:testing that we find glue A/AAAA RRs in the cache ($n)"
  45. # $DIG +norec @10.53.0.1 -p 53210 foo.bar.yy. a >dig.out.$n || status=1
  46. # $PERL $DIGCOMP yy.good dig.out.$n || status=1
  47. # n=`expr $n + 1`
  48. echo "I:testing that we don't find out-of-zone glue ($n)"
  49. $DIG +norec @10.53.0.1 -p 53210 example.net. a > dig.out.$n || status=1
  50. $PERL $DIGCOMP noglue.good dig.out.$n || status=1
  51. n=`expr $n + 1`
  52. # This test currently fails (additional section will be empty, which is
  53. # incorrect). See Trac ticket #646.
  54. #echo "I:testing that we are finding partial out-of-zone glue ($n)"
  55. #$DIG +norec @10.53.0.1 -p 53210 foo.bar.test. a >dig.out.$n || status=1
  56. #$PERL $DIGCOMP test.good dig.out.$n || status=1
  57. #n=`expr $n + 1`
  58. echo "I:exit status: $status"
  59. exit $status