[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 4/9] mg-schema-test-database: Borrow shares properly



Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 mg-schema-test-database |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/mg-schema-test-database b/mg-schema-test-database
index a4cb732..4e0ee68 100755
--- a/mg-schema-test-database
+++ b/mg-schema-test-database
@@ -448,12 +448,22 @@ END
        done
 
        # As we copy, we note everything we're not borrowing as
-       # belonging to the parent db.
+       # belonging to the parent db.  We borrow shares of a shared
+       # resource.  If we borrow only some rather than all of the
+       # shares, neither DB will be able to unshare it.
+
+       # In principle it might be possible to actually use different
+       # shares of the same resource with different dbs.  However the
+       # `sharetype' contains the osstest revision, which prevents
+       # sharing between test and real versions of osstest code.
+
        cat >>$t.import <<END
                $(make_xdbref_task $maindbname 'not borrowed' '' PARENT)
                UPDATE resources
                        SET owntaskid = $(taskid xdbref $maindbname)
-                       WHERE owntaskid != $(borrowtaskid $task);
+                       WHERE owntaskid != $(borrowtaskid $task)
+                         AND owntaskid != $(taskid magic shared)
+                         AND owntaskid != $(taskid magic preparing);
                COMMIT;
 END
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.