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

[Xen-devel] [OSSTEST PATCH 2/9] mg-schema-test-database: Wrap some withtest psql_do in subshells



Otherwise it takes effect for the rest of the script, which is not
what is wanted !  As it happens, there are no accesses to the real db
after this point, so this bug is latent.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 mg-schema-test-database | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mg-schema-test-database b/mg-schema-test-database
index a82c044..0517ca3 100755
--- a/mg-schema-test-database
+++ b/mg-schema-test-database
@@ -509,19 +509,20 @@ END
        printf "borrow..."
 
        for task in $tasks; do
-               withtest psql_do <<END
+               (withtest psql_do <<END
                        BEGIN;
                        UPDATE resources
                                SET owntaskid = $(taskid magic idle)
                                WHERE owntaskid = $(borrowtaskid $task);
                        COMMIT;
 END
+                )
        done
-       withtest psql_do <<END
+       (withtest psql_do <<END
                DELETE FROM tasks
                        WHERE type='xdbref' AND refkey='$dbname';
 END
-
+        )
        printf "\n"
 
        cat <<END
-- 
2.1.4


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

 


Rackspace

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