Merge lp:~nbrinza/zorba/bugs into lp:zorba

Proposed by Nicolae Brinza
Status: Superseded
Proposed branch: lp:~nbrinza/zorba/bugs
Merge into: lp:zorba
Diff against target: 79 lines (+23/-5)
3 files modified
ChangeLog (+4/-0)
src/types/typeimpl.cpp (+19/-4)
test/rbkt/Queries/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~nbrinza/zorba/bugs
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Markos Zaharioudakis Pending
Review via email: mp+81480@code.launchpad.net

This proposal supersedes a proposal from 2011-11-07.

This proposal has been superseded by a proposal from 2011-12-15.

Description of the change

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

Nicolae, could you please also update the ChangeLog?

review: Needs Fixing
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bugs-2011-11-03T02-45-02.853Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job bugs-2011-11-07T17-26-04.331Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Pending.

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job bugs-2011-11-07T17-48-33.425Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue starting for merge proposal.
Log at: http://zorbatest.lambda.nu:8080/remotequeue/bugs-2011-11-07T18-09-02.8Z/log.html

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job bugs-2011-11-07T18-09-02.8Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Markos Zaharioudakis (markos-za) wrote :

In computing the value of the is_element_test variable, why do we need the condition:

dynamic_cast<const NodeXQType*>(m_content_type.getp())->m_schema_test == false

? In fact, this seems wrong to me, because if "this" is document-node(SchemaElementTest), then we will return true without really checking the SchemaElementTest.

BTW, the dynamic_cast is not necessary since you have already checked the type kind. A static_cast is better here.

lp:~nbrinza/zorba/bugs updated
10538. By Nicolae Brinza

Merged changes from Zorba trunk

10539. By Nicolae Brinza

Related to the Steps-leading-lone-slash-8a test: removed an unecessary condition from typeimpl.cpp. Removed the expected failure for the said test.

10540. By Nicolae Brinza

Merged with Zorba trunk

10541. By Nicolae Brinza

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

10542. By Nicolae Brinza

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10543. By Nicolae Brinza

Added spec files for tests with the document-node(schema-element()) node tests

10544. By Nicolae Brinza

Merged with Zorba trunk

10545. By Nicolae Brinza

Merged with Zorba trunk

10546. By Nicolae Brinza

Merged with Zorba trunk

10547. By Nicolae Brinza

Merged with Zorba trunk

10548. By Nicolae Brinza

Merged with Zorba trunk

10549. By Nicolae Brinza

Fixed the 6 failing doc-node-schema-elem-test- tests

10550. By Nicolae Brinza

Merged with Zorba trunk

Unmerged revisions

10550. By Nicolae Brinza

Merged with Zorba trunk

10549. By Nicolae Brinza

Fixed the 6 failing doc-node-schema-elem-test- tests

10548. By Nicolae Brinza

Merged with Zorba trunk

10547. By Nicolae Brinza

Merged with Zorba trunk

10546. By Nicolae Brinza

Merged with Zorba trunk

10545. By Nicolae Brinza

Merged with Zorba trunk

10544. By Nicolae Brinza

Merged with Zorba trunk

10543. By Nicolae Brinza

Added spec files for tests with the document-node(schema-element()) node tests

10542. By Nicolae Brinza

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10541. By Nicolae Brinza

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-12-13 03:38:23 +0000
3+++ ChangeLog 2011-12-15 13:22:30 +0000
4@@ -1,5 +1,9 @@
5 Zorba - The XQuery Processor
6
7+version 2.x
8+
9+ * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
10+
11 version 2.2
12
13 * Caching of results for recursive functions with atomic parameter and return types.
14
15=== modified file 'src/types/typeimpl.cpp'
16--- src/types/typeimpl.cpp 2011-07-01 05:22:12 +0000
17+++ src/types/typeimpl.cpp 2011-12-15 13:22:30 +0000
18@@ -361,7 +361,7 @@
19
20
21 bool NodeXQType::is_subtype(
22- const TypeManager* tm,
23+ const TypeManager* tm,
24 const NodeXQType& supertype,
25 const QueryLoc& loc) const
26 {
27@@ -443,7 +443,7 @@
28
29
30 bool NodeXQType::is_supertype(
31- const TypeManager* tm,
32+ const TypeManager* tm,
33 const store::Item* subitem,
34 const QueryLoc& loc) const
35 {
36@@ -488,14 +488,29 @@
37 }
38 }
39
40- if (m_node_kind != store::StoreConsts::elementNode &&
41- m_node_kind != store::StoreConsts::attributeNode)
42+ // document-node( E ) matches any document node that contains exactly one element
43+ // node, optionally accompanied by one or more comment and processing instruction
44+ // nodes, if E is an ElementTest or SchemaElementTest that matches the element node.
45+ bool is_element_test = (
46+ m_node_kind == store::StoreConsts::documentNode &&
47+ m_content_type != NULL &&
48+ m_content_type->type_kind() == XQType::NODE_TYPE_KIND);
49+
50+ if (m_node_kind != store::StoreConsts::elementNode &&
51+ m_node_kind != store::StoreConsts::attributeNode &&
52+ !is_element_test)
53 return true;
54
55 if (m_content_type == NULL ||
56 m_content_type->type_kind() == XQType::ANY_TYPE_KIND)
57 return true;
58
59+ if (is_element_test)
60+ {
61+ xqtref_t documentNodeType = tm->create_value_type(subitem, loc);
62+ return TypeOps::is_subtype(tm, *documentNodeType, *this);
63+ }
64+
65 xqtref_t subContentType = tm->create_named_type(subitem->getType(),
66 TypeConstants::QUANT_ONE,
67 loc,
68
69=== modified file 'test/rbkt/Queries/CMakeLists.txt'
70--- test/rbkt/Queries/CMakeLists.txt 2011-12-09 19:37:09 +0000
71+++ test/rbkt/Queries/CMakeLists.txt 2011-12-15 13:22:30 +0000
72@@ -210,7 +210,6 @@
73 ####
74 IF (FOUND_XQTS AND NOT ZORBA_TEST_W3C_TO_SUBMIT_RESULTS)
75
76- EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Steps-leading-lone-slash-8a 3408285)
77 EXPECTED_FAILURE(test/rbkt/w3c_testsuite/XQuery/Functions/QNameFunc/NamespaceURIForPrefixFunc/K2-NamespaceURIForPrefixFunc-2 872732)
78
79 IF(NOT ZORBA_WITH_BIG_INTEGER)

Subscribers

People subscribed via source and target branches