提交 b7803719 authored 作者: Steve Underwood's avatar Steve Underwood

Improved TSB85 tests, which now check call clearing.

FAX now differentiates properly between <page result code> and <image> <page resuly code> when deciding how to retry.
上级 d886cc12
......@@ -33,6 +33,7 @@
modem CDATA #IMPLIED
tag CDATA #IMPLIED
value CDATA #IMPLIED
timein CDATA #IMPLIED
timeout CDATA #IMPLIED
crc_error CDATA #IMPLIED
pattern CDATA #IMPLIED
......
......@@ -91,6 +91,9 @@
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="T" type="CLEAR"/>
<step dir="R" type="CLEAR" timein="0" timeout="100"/>
<step type="STATUS" value="RX_DCNDATA"/>
</test>
<test name="V17-12000-V29-9600">
<!-- Tester calls, trying to provoke a crash seen in some versions of spandsp, when
......@@ -183,6 +186,9 @@
<step dir="T" type="PREAMBLE" modem="V.21"/>
<step dir="T" type="HDLC" tag="DCN" value="FF C8 5F"/>
<step dir="T" type="POSTAMBLE"/>
<step dir="T" type="CLEAR"/>
<step dir="R" type="CLEAR" timein="0" timeout="100"/>
<step type="STATUS" value="OK"/>
</test>
<test name="Phase-D-collision">
<!-- DUT calls tester and sends 1 IMPRESS and 1 WHITE page. The MCF after the first
......@@ -224,6 +230,8 @@
<step dir="T" type="POSTAMBLE"/>
<step dir="R" type="HDLC" modem="V.21" tag="DCN+" value="FF C8 DF"/>
<step dir="R" type="CLEAR" timein="800" timeout="1200"/>
<step type="STATUS" value="OK"/>
</test>
</test-group>
</fax-tests>
......@@ -181,6 +181,10 @@ struct t30_state_s
/*! \brief True if the short training sequence should be used. */
bool short_train;
/*! \brief True if an image carrier appears to have been received, even if it did not successfully
train. */
bool image_carrier_attempted;
/*! \brief A count of the number of bits in the trainability test. This counts down to zero when
sending TCF, and counts up when receiving it. */
int tcf_test_bits;
......@@ -293,6 +297,8 @@ struct t30_state_s
partial pages still to come. */
bool ecm_at_page_end;
/*! \brief The last result for a received non-ECM page - T30_MPS, T30_RTP, or T30_RTN. */
int last_rx_page_result;
/*! \brief The transmission step queued to follow the one in progress. */
int next_tx_step;
/*! \brief The FCF for the next receive step. */
......@@ -310,11 +316,6 @@ struct t30_state_s
/*! \brief The current completion status. */
int current_status;
/*! \brief The number of RTP events */
int rtp_events;
/*! \brief The number of RTN events */
int rtn_events;
/*! \brief the FCF2 field of the last PPS message we received. */
uint8_t last_pps_fcf2;
/*! \brief True if all frames of the current received ECM block are now OK */
......@@ -323,6 +324,11 @@ struct t30_state_s
deciding whether to continue error correction when PPRs keep repeating. */
int ecm_progress;
/*! \brief The number of RTP events */
int rtp_events;
/*! \brief The number of RTN events */
int rtn_events;
/*! \brief Error and flow logging control */
logging_state_t logging;
};
......
差异被折叠。
......@@ -264,32 +264,39 @@ static void parse_tone_set(super_tone_rx_descriptor_t *desc, xmlDocPtr doc, xmlN
static void get_tone_set(super_tone_rx_descriptor_t *desc, const char *tone_file, const char *set_id)
{
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNsPtr ns;
xmlNodePtr cur;
#if 1
xmlValidCtxt valid;
#endif
xmlChar *x;
ns = NULL;
xmlKeepBlanksDefault(0);
xmlCleanupParser();
if ((doc = xmlParseFile(tone_file)) == NULL)
if ((ctxt = xmlNewParserCtxt()) == NULL)
{
fprintf(stderr, "No document\n");
fprintf(stderr, "Failed to allocate parser context\n");
printf("Test failed\n");
exit(2);
}
/*endif*/
xmlXIncludeProcess(doc);
#if 1
if (!xmlValidateDocument(&valid, doc))
/* parse the file, activating the DTD validation option */
if ((doc = xmlCtxtReadFile(ctxt, tone_file, NULL, XML_PARSE_XINCLUDE | XML_PARSE_DTDVALID)) == NULL)
{
fprintf(stderr, "Invalid document\n");
fprintf(stderr, "Failed to read the XML document\n");
printf("Test failed\n");
exit(2);
}
/*endif*/
#endif
if (ctxt->valid == 0)
{
fprintf(stderr, "Failed to validate the XML document\n");
xmlFreeDoc(doc);
xmlFreeParserCtxt(ctxt);
printf("Test failed\n");
exit(2);
}
xmlFreeParserCtxt(ctxt);
/* Check the document is of the right kind */
if ((cur = xmlDocGetRootElement(doc)) == NULL)
{
......
......@@ -203,33 +203,39 @@ static void parse_tone_set(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur)
static void get_tone_set(const char *tone_file, const char *set_id)
{
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNsPtr ns;
xmlNodePtr cur;
#if 0
xmlValidCtxt valid;
#endif
xmlChar *x;
ns = NULL;
xmlKeepBlanksDefault(0);
xmlCleanupParser();
doc = xmlParseFile(tone_file);
if (doc == NULL)
if ((ctxt = xmlNewParserCtxt()) == NULL)
{
fprintf(stderr, "No document\n");
fprintf(stderr, "Failed to allocate parser context\n");
printf("Test failed\n");
exit(2);
}
/*endif*/
xmlXIncludeProcess(doc);
#if 0
if (!xmlValidateDocument(&valid, doc))
/* parse the file, activating the DTD validation option */
if ((doc = xmlCtxtReadFile(ctxt, tone_file, NULL, XML_PARSE_XINCLUDE | XML_PARSE_DTDVALID)) == NULL)
{
fprintf(stderr, "Invalid document\n");
fprintf(stderr, "Failed to read the XML document\n");
printf("Test failed\n");
exit(2);
}
/*endif*/
#endif
if (ctxt->valid == 0)
{
fprintf(stderr, "Failed to validate the XML document\n");
xmlFreeDoc(doc);
xmlFreeParserCtxt(ctxt);
printf("Test failed\n");
exit(2);
}
xmlFreeParserCtxt(ctxt);
/* Check the document is of the right kind */
if ((cur = xmlDocGetRootElement(doc)) == NULL)
{
......
......@@ -38,8 +38,7 @@ done
#MRGN16 fails because we don't adequately distinguish between receiving a
#bad image signal and receiving none at all.
#for TEST in MRGN09 MRGN10 MRGN11 MRGN12 MRGN13 MRGN14 MRGN15 MRGN16 MRGN17
for TEST in MRGN09 MRGN10 MRGN11 MRGN12 MRGN13 MRGN15 MRGN17
for TEST in MRGN09 MRGN10 MRGN11 MRGN12 MRGN13 MRGN14 MRGN15 MRGN16 MRGN17
do
run_tsb85_test
done
......@@ -58,8 +57,7 @@ done
# MRGX05 is failing because we don't distinguish MPS immediately after MCF from MPS after
# a corrupt image signal.
#for TEST in MRGX01 MRGX02 MRGX03 MRGX04 MRGX05 MRGX06 MRGX07 MRGX08
for TEST in MRGX01 MRGX02 MRGX04 MRGX06 MRGX07 MRGX08
for TEST in MRGX01 MRGX02 MRGX03 MRGX04 MRGX05 MRGX06 MRGX07 MRGX08
do
run_tsb85_test
done
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论