BIND 10 trac1113, updated. d7834356a301b162fb9757427359d0dbac95cecf [trac1113] update minfo unittest, avoid using hardcoded test data

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Aug 15 06:45:28 UTC 2011


The branch, trac1113 has been updated
       via  d7834356a301b162fb9757427359d0dbac95cecf (commit)
      from  c293f639684d2c6625b7395c995aa813eafa5fa4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d7834356a301b162fb9757427359d0dbac95cecf
Author: chenzhengzhang <jerry.zzpku at gmail.com>
Date:   Mon Aug 15 14:43:22 2011 +0800

    [trac1113] update minfo unittest, avoid using hardcoded test data

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dns/rdata/generic/minfo_14.cc              |   11 ++-
 src/lib/dns/rdata/generic/minfo_14.h               |    5 +
 src/lib/dns/tests/rdata_minfo_unittest.cc          |   98 ++++++++++++++-----
 src/lib/dns/tests/testdata/Makefile.am             |   14 +++-
 src/lib/dns/tests/testdata/rdata_minfo_fromWire    |   47 ----------
 .../dns/tests/testdata/rdata_minfo_fromWire1.spec  |    3 +
 .../dns/tests/testdata/rdata_minfo_fromWire2.spec  |    7 ++
 .../dns/tests/testdata/rdata_minfo_fromWire3.spec  |    6 +
 .../dns/tests/testdata/rdata_minfo_fromWire4.spec  |    6 +
 .../dns/tests/testdata/rdata_minfo_fromWire5.spec  |    5 +
 .../dns/tests/testdata/rdata_minfo_fromWire6.spec  |    5 +
 src/lib/dns/tests/testdata/rdata_minfo_toWire      |   15 ---
 .../dns/tests/testdata/rdata_minfo_toWire1.spec    |    5 +
 .../dns/tests/testdata/rdata_minfo_toWire2.spec    |    6 +
 .../testdata/rdata_minfo_toWireUncompressed.wire   |    8 --
 ...d.spec => rdata_minfo_toWireUncompressed1.spec} |    1 +
 ...d.spec => rdata_minfo_toWireUncompressed2.spec} |    2 +
 17 files changed, 144 insertions(+), 100 deletions(-)
 delete mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec
 delete mode 100644 src/lib/dns/tests/testdata/rdata_minfo_toWire
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec
 create mode 100644 src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec
 delete mode 100644 src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.wire
 copy src/lib/dns/tests/testdata/{rdata_minfo_toWireUncompressed.spec => rdata_minfo_toWireUncompressed1.spec} (89%)
 rename src/lib/dns/tests/testdata/{rdata_minfo_toWireUncompressed.spec => rdata_minfo_toWireUncompressed2.spec} (69%)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/rdata/generic/minfo_14.cc b/src/lib/dns/rdata/generic/minfo_14.cc
index 072c767..734fbc3 100644
--- a/src/lib/dns/rdata/generic/minfo_14.cc
+++ b/src/lib/dns/rdata/generic/minfo_14.cc
@@ -79,8 +79,7 @@ MINFO::MINFO(const std::string& minfo_str) :
 /// names in the wire is invalid.
 MINFO::MINFO(InputBuffer& buffer, size_t) :
     rmailbox_(buffer), emailbox_(buffer)
-{
-}
+{}
 
 /// \brief Copy constructor.
 ///
@@ -114,6 +113,14 @@ MINFO::toWire(OutputBuffer& buffer) const {
     emailbox_.toWire(buffer);
 }
 
+MINFO&
+MINFO::operator=(const MINFO& source) {
+    rmailbox_ = source.rmailbox_;
+    emailbox_ = source.emailbox_;
+
+    return (*this);
+}
+
 /// \brief Render the \c MINFO in the wire format with taking into account
 /// compression.
 ///
diff --git a/src/lib/dns/rdata/generic/minfo_14.h b/src/lib/dns/rdata/generic/minfo_14.h
index f93f619..f7afcc5 100644
--- a/src/lib/dns/rdata/generic/minfo_14.h
+++ b/src/lib/dns/rdata/generic/minfo_14.h
@@ -37,6 +37,11 @@ public:
     // BEGIN_COMMON_MEMBERS
     // END_COMMON_MEMBERS
 
+    /// \brief Define the assignment operator.
+    ///
+    /// This method never throws an exception.
+    MINFO& operator=(const MINFO& source);
+
     /// \brief Return the value of the rmailbox field.
     ///
     /// \exception std::bad_alloc If resource allocation for the returned
diff --git a/src/lib/dns/tests/rdata_minfo_unittest.cc b/src/lib/dns/tests/rdata_minfo_unittest.cc
index b700968..0956161 100644
--- a/src/lib/dns/tests/rdata_minfo_unittest.cc
+++ b/src/lib/dns/tests/rdata_minfo_unittest.cc
@@ -31,21 +31,30 @@ using namespace isc::dns;
 using namespace isc::util;
 using namespace isc::dns::rdata;
 
-namespace {
-class Rdata_MINFO_Test : public RdataTest {
-    // there's nothing to specialize
-};
-
 // minfo text
 const char* const minfo_txt = "rmailbox.example.com. emailbox.example.com.";
+const char* const minfo_txt2 = "root.example.com. emailbox.example.com.";
 const char* const too_long_label = "01234567890123456789012345678901234567"
                                    "89012345678901234567890123";
 
-const generic::MINFO rdata_minfo((string(minfo_txt)));
+namespace {
+class Rdata_MINFO_Test : public RdataTest {
+    // there's nothing to specialize
+public:
+    Rdata_MINFO_Test():
+        rdata_minfo(string(minfo_txt)), rdata_minfo2(string(minfo_txt2)) {}
+
+    const generic::MINFO rdata_minfo;
+    const generic::MINFO rdata_minfo2;
+};
+
 
 TEST_F(Rdata_MINFO_Test, createFromText) {
     EXPECT_EQ(Name("rmailbox.example.com."), rdata_minfo.getRmailbox());
     EXPECT_EQ(Name("emailbox.example.com."), rdata_minfo.getEmailbox());
+
+    EXPECT_EQ(Name("root.example.com."), rdata_minfo2.getRmailbox());
+    EXPECT_EQ(Name("emailbox.example.com."), rdata_minfo2.getEmailbox());
 }
 
 TEST_F(Rdata_MINFO_Test, badText) {
@@ -57,60 +66,97 @@ TEST_F(Rdata_MINFO_Test, badText) {
                                 "example.com."),
                  InvalidRdataText);
     // bad rmailbox name
-    EXPECT_THROW(generic::MINFO("root.example.com. emailbx.example.com." +
+    EXPECT_THROW(generic::MINFO("root.example.com. emailbox.example.com." +
                                 string(too_long_label)),
                  TooLongLabel);
     // bad emailbox name
     EXPECT_THROW(generic::MINFO("root.example.com."  +
-                          string(too_long_label) + " emailbx.example.com."),
+                          string(too_long_label) + " emailbox.example.com."),
                  TooLongLabel);
 }
 
 TEST_F(Rdata_MINFO_Test, createFromWire) {
-    // compressed emailbx name
+    // uncompressed names
     EXPECT_EQ(0, rdata_minfo.compare(
                   *rdataFactoryFromFile(RRType::MINFO(), RRClass::IN(),
-                                        "rdata_minfo_fromWire")));
-    // compressed rmailbx and emailbx name
+                                     "rdata_minfo_fromWire1.wire")));
+    // compressed names
     EXPECT_EQ(0, rdata_minfo.compare(
-                  *rdataFactoryFromFile(RRType("MINFO"), RRClass::IN(),
-                                        "rdata_minfo_fromWire", 35)));
+                  *rdataFactoryFromFile(RRType::MINFO(), RRClass::IN(),
+                                     "rdata_minfo_fromWire2.wire", 15)));
     // RDLENGTH is too short
     EXPECT_THROW(rdataFactoryFromFile(RRType::MINFO(), RRClass::IN(),
-                                      "rdata_minfo_fromWire", 41),
+                                     "rdata_minfo_fromWire3.wire"),
                  InvalidRdataLength);
     // RDLENGTH is too long
     EXPECT_THROW(rdataFactoryFromFile(RRType::MINFO(), RRClass::IN(),
-                                      "rdata_minfo_fromWire", 47),
+                                      "rdata_minfo_fromWire4.wire"),
                  InvalidRdataLength);
-    // incomplete name.  the error should be detected in the name constructor
-    EXPECT_THROW(rdataFactoryFromFile(RRType("MINFO"), RRClass::IN(),
-                                      "rdata_minfo_fromWire", 53),
+    // bogus rmailbox name, the error should be detected in the name
+    // constructor
+    EXPECT_THROW(rdataFactoryFromFile(RRType::MINFO(), RRClass::IN(),
+                                      "rdata_minfo_fromWire5.wire"),
+                 DNSMessageFORMERR);
+    // bogus emailbox name, the error should be detected in the name
+    // constructor
+    EXPECT_THROW(rdataFactoryFromFile(RRType::MINFO(), RRClass::IN(),
+                                      "rdata_minfo_fromWire6.wire"),
                  DNSMessageFORMERR);
 }
 
+TEST_F(Rdata_MINFO_Test, assignment) {
+    generic::MINFO copy((string(minfo_txt2)));
+    copy = rdata_minfo;
+    EXPECT_EQ(0, copy.compare(rdata_minfo));
+
+    // Check if the copied data is valid even after the original is deleted
+    generic::MINFO* copy2 = new generic::MINFO(rdata_minfo);
+    generic::MINFO copy3((string(minfo_txt2)));
+    copy3 = *copy2;
+    delete copy2;
+    EXPECT_EQ(0, copy3.compare(rdata_minfo));
+
+    // Self assignment
+    copy = copy;
+    EXPECT_EQ(0, copy.compare(rdata_minfo));
+}
+
 TEST_F(Rdata_MINFO_Test, toWireBuffer) {
-    obuffer.skip(2);
     rdata_minfo.toWire(obuffer);
     vector<unsigned char> data;
-    UnitTestUtil::readWireData("rdata_minfo_toWireUncompressed.wire", data);
+    UnitTestUtil::readWireData("rdata_minfo_toWireUncompressed1.wire", data);
     EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
-                        static_cast<const uint8_t *>(obuffer.getData()) + 2,
-                        obuffer.getLength() - 2, &data[2], data.size() - 2);
+                        static_cast<const uint8_t *>(obuffer.getData()),
+                        obuffer.getLength(), &data[0], data.size());
+
+    obuffer.clear();
+    rdata_minfo2.toWire(obuffer);
+    vector<unsigned char> data2;
+    UnitTestUtil::readWireData("rdata_minfo_toWireUncompressed2.wire", data2);
+    EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
+                        static_cast<const uint8_t *>(obuffer.getData()),
+                        obuffer.getLength(), &data2[0], data2.size());
 }
 
 TEST_F(Rdata_MINFO_Test, toWireRenderer) {
-    obuffer.skip(2);
     rdata_minfo.toWire(renderer);
     vector<unsigned char> data;
-    UnitTestUtil::readWireData("rdata_minfo_toWire", data);
+    UnitTestUtil::readWireData("rdata_minfo_toWire1.wire", data);
+    EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
+                        static_cast<const uint8_t *>(obuffer.getData()),
+                        obuffer.getLength(), &data[0], data.size());
+    renderer.clear();
+    rdata_minfo2.toWire(renderer);
+    vector<unsigned char> data2;
+    UnitTestUtil::readWireData("rdata_minfo_toWire2.wire", data2);
     EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
-                        static_cast<const uint8_t *>(obuffer.getData()) + 2,
-                        obuffer.getLength() - 2, &data[2], data.size() - 2);
+                        static_cast<const uint8_t *>(obuffer.getData()),
+                        obuffer.getLength(), &data2[0], data2.size());
 }
 
 TEST_F(Rdata_MINFO_Test, toText) {
     EXPECT_EQ(minfo_txt, rdata_minfo.toText());
+    EXPECT_EQ(minfo_txt2, rdata_minfo2.toText());
 }
 
 TEST_F(Rdata_MINFO_Test, compare) {
diff --git a/src/lib/dns/tests/testdata/Makefile.am b/src/lib/dns/tests/testdata/Makefile.am
index 7e90b2c..3dac8f2 100644
--- a/src/lib/dns/tests/testdata/Makefile.am
+++ b/src/lib/dns/tests/testdata/Makefile.am
@@ -26,6 +26,12 @@ BUILT_SOURCES += rdata_nsec3_fromWire10.wire rdata_nsec3_fromWire11.wire
 BUILT_SOURCES += rdata_nsec3_fromWire12.wire rdata_nsec3_fromWire13.wire
 BUILT_SOURCES += rdata_nsec3_fromWire14.wire rdata_nsec3_fromWire15.wire
 BUILT_SOURCES += rdata_rrsig_fromWire2.wire
+BUILT_SOURCES += rdata_minfo_fromWire1.wire rdata_minfo_fromWire2.wire
+BUILT_SOURCES += rdata_minfo_fromWire3.wire rdata_minfo_fromWire4.wire
+BUILT_SOURCES += rdata_minfo_fromWire5.wire rdata_minfo_fromWire6.wire
+BUILT_SOURCES += rdata_minfo_toWire1.wire rdata_minfo_toWire2.wire
+BUILT_SOURCES += rdata_minfo_toWireUncompressed1.wire
+BUILT_SOURCES += rdata_minfo_toWireUncompressed2.wire
 BUILT_SOURCES += rdata_rp_fromWire1.wire rdata_rp_fromWire2.wire
 BUILT_SOURCES += rdata_rp_fromWire3.wire rdata_rp_fromWire4.wire
 BUILT_SOURCES += rdata_rp_fromWire5.wire rdata_rp_fromWire6.wire
@@ -101,8 +107,12 @@ EXTRA_DIST += rdata_rp_fromWire5.spec rdata_rp_fromWire6.spec
 EXTRA_DIST += rdata_rp_toWire1.spec rdata_rp_toWire2.spec
 EXTRA_DIST += rdata_soa_fromWire rdata_soa_toWireUncompressed.spec
 EXTRA_DIST += rdata_srv_fromWire
-EXTRA_DIST += rdata_minfo_fromWire rdata_minfo_toWireUncompressed.spec
-EXTRA_DIST += rdata_minfo_toWireUncompressed.wire rdata_minfo_toWire
+EXTRA_DIST += rdata_minfo_fromWire1.spec rdata_minfo_fromWire2.spec
+EXTRA_DIST += rdata_minfo_fromWire3.spec rdata_minfo_fromWire4.spec
+EXTRA_DIST += rdata_minfo_fromWire5.spec rdata_minfo_fromWire6.spec
+EXTRA_DIST += rdata_minfo_toWire1.spec rdata_minfo_toWire2.spec
+EXTRA_DIST += rdata_minfo_toWireUncompressed1.spec
+EXTRA_DIST += rdata_minfo_toWireUncompressed2.spec
 EXTRA_DIST += rdata_txt_fromWire1 rdata_txt_fromWire2.spec
 EXTRA_DIST += rdata_txt_fromWire3.spec rdata_txt_fromWire4.spec
 EXTRA_DIST += rdata_txt_fromWire5.spec rdata_unknown_fromWire
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire b/src/lib/dns/tests/testdata/rdata_minfo_fromWire
deleted file mode 100644
index d620931..0000000
--- a/src/lib/dns/tests/testdata/rdata_minfo_fromWire
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# various kinds of MINFO RDATA stored in an input buffer
-# 
-# Valid compressed RDATA for "(rmailbox.example.com. emailbox.example.com.)"
-# RDLENGHT=32 bytes
-# 0  1
- 00 21
-# RMAILBOX: non compressed
-# 2  3  4  5  6  7  8  9 10  1  2  3  4  5  6  7  8  9 20  1  2  3(bytes)
-#(8) r  m  a  i  l  b  o  x (7) e  x  a  m  p  l  e (3) c  o  m  .
- 08 72 6d 61 69 6c 62 6f 78 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
-# EMAILBOX: compressed
-# 4  5  6  7  8  9 30  1  2  3  4
-#(8) e  m  a  i  l  b  o  x ptr=11
- 08 65 6d 61 69 6c 62 6f 78 c0 0b
-#
-# Both RMAILBOX and EMAILBOX compressed
-# RDLENGHT=04 bytes
-# 5  6
- 00 04
-# 7  8  9 40(bytes)
-#ptr=02 ptr=24
- c0 02 c0 18
-#
-# rdlength too short
-# RDLENGHT=03 bytes
-# 1  2
- 00 03
-# 3  4  5  6(bytes)
-#ptr=02 ptr=24
- c0 02 c0 18
-#
-# rdlength too long
-# RDLENGHT=25 bytes
-# 7  8
- 00 19
-# 9 50  1  2(bytes)
-#ptr=02 ptr=24
- c0 02 c0 18
-#
-# incomplete RMAILBOX NAME
-# RDLENGHT=19 bytes
-# 3  4
- 00 13
-# 5  6  7  8  9 60  1  2  3  4  5  6  7  8  9 60  1  2  3 (bytes)
-#(8) r  m  a  i  l  b  o  x (7) e  x  a  m  p  l  e (3) c
- 08 72 6d 61 69 6c 62 6f 78 07 65 78 61 6d 70 6c 65 03 63
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec
new file mode 100644
index 0000000..2c43db0
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire1.spec
@@ -0,0 +1,3 @@
+[custom]
+sections: minfo
+[minfo]
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec
new file mode 100644
index 0000000..d781cac
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire2.spec
@@ -0,0 +1,7 @@
+[custom]
+sections: name:minfo
+[name]
+name: a.example.com.
+[minfo]
+rmailbox: rmailbox.ptr=02
+emailbox: emailbox.ptr=02
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec
new file mode 100644
index 0000000..a1d4b76
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire3.spec
@@ -0,0 +1,6 @@
+[custom]
+sections: minfo
+# rdlength too short
+[minfo]
+emailbox: emailbox.ptr=11
+rdlen: 3
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec
new file mode 100644
index 0000000..269a6ce
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire4.spec
@@ -0,0 +1,6 @@
+[custom]
+sections: minfo
+# rdlength too long
+[minfo]
+emailbox: emailbox.ptr=11
+rdlen: 80
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec
new file mode 100644
index 0000000..3a888e3
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire5.spec
@@ -0,0 +1,5 @@
+[custom]
+sections: minfo
+# bogus rmailbox name
+[minfo]
+rmailbox: "01234567890123456789012345678901234567890123456789012345678901234"
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec b/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec
new file mode 100644
index 0000000..c75ed8e
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_fromWire6.spec
@@ -0,0 +1,5 @@
+[custom]
+sections: minfo
+# bogus emailbox name
+[minfo]
+emailbox: "01234567890123456789012345678901234567890123456789012345678901234"
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire b/src/lib/dns/tests/testdata/rdata_minfo_toWire
deleted file mode 100644
index c0d09d3..0000000
--- a/src/lib/dns/tests/testdata/rdata_minfo_toWire
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# various kinds of MINFO RDATA stored in an input buffer
-# 
-# Valid compressed RDATA for "(rmailbox.example.com. emailbox.example.com.)"
-# RDLENGHT=32 bytes
-# 0  1
- 00 21
-# RMAILBOX: non compressed
-# 2  3  4  5  6  7  8  9 10  1  2  3  4  5  6  7  8  9 20  1  2  3(bytes)
-#(8) r  m  a  i  l  b  o  x (7) e  x  a  m  p  l  e (3) c  o  m  .
- 08 72 6d 61 69 6c 62 6f 78 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
-# EMAILBOX: compressed
-# 4  5  6  7  8  9 30  1  2  3  4
-#(8) e  m  a  i  l  b  o  x ptr=11
- 08 65 6d 61 69 6c 62 6f 78 c0 0b
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec
new file mode 100644
index 0000000..7b340a3
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_toWire1.spec
@@ -0,0 +1,5 @@
+[custom]
+sections: minfo
+[minfo]
+emailbox: emailbox.ptr=09
+rdlen: -1
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec
new file mode 100644
index 0000000..132f118
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_toWire2.spec
@@ -0,0 +1,6 @@
+[custom]
+sections: minfo
+[minfo]
+rmailbox: root.example.com.
+emailbox: emailbox.ptr=05
+rdlen: -1
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.spec
deleted file mode 100644
index 209b301..0000000
--- a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.spec
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# A simplest form of MINFO: all default parameters
-#
-[custom]
-sections: minfo
-[minfo]
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.wire b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.wire
deleted file mode 100644
index bd51833..0000000
--- a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed.wire
+++ /dev/null
@@ -1,8 +0,0 @@
-###
-### This data file was auto-generated from rdata_minfo_toWireUncompressed.spec
-###
-
-# MINFO RDATA, RDLEN=44
-002c
-# RMAILBOX=rmailbox.example.com EMAILBOX=emailbox.example.com
-08726d61696c626f78076578616d706c6503636f6d00 08656d61696c626f78076578616d706c6503636f6d00
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.spec
new file mode 100644
index 0000000..d99a381
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed1.spec
@@ -0,0 +1,7 @@
+#
+# A simplest form of MINFO: all default parameters
+#
+[custom]
+sections: minfo
+[minfo]
+rdlen: -1
diff --git a/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.spec b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.spec
new file mode 100644
index 0000000..1182c2b
--- /dev/null
+++ b/src/lib/dns/tests/testdata/rdata_minfo_toWireUncompressed2.spec
@@ -0,0 +1,8 @@
+#
+# A simplest form of MINFO: all default parameters
+#
+[custom]
+sections: minfo
+[minfo]
+rmailbox: root.example.com.
+rdlen: -1




More information about the bind10-changes mailing list