Skip to contentSkip to conversation

ap-fetch-version-old: Fix qemu branch handling after mergin of qemu trees

PATCH In review Ian Campbell 2 participants 3 messages Oct 23, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ap-fetch-version-old: Fix qemu branch handling after mergin of qemu trees

ap-fetch-version-old should always reference the output gate, but 99e92a6b3991 "Switch to merged qemu-xen{,-traditional}.git trees" switched it to use TREE_QEMU_UPSTREAM directly, which can be overridden by cr-daily-branch. This broke at least when OSSTEST_BASELINES_ONLY=y since "cr-daily-branch qemu-mainline" ends up looking for an "upstream-tested" branch in the qemu.org git tree, when it should be looking at our output tree on xenbits.

Follow pattern of TREE_LINUX and set BASE_TREE_QEMU_UPSTREAM to the output gate and then conditionally set TREE_QEMU_UPSTREAM to the BASE_TREE if it is not already set. Switch ap-fetch-version-old to use BASE_TREE.

I have confirmed that for
qemu-{mainline,upstream-unstable,4.6-testing} both
TREE_QEMU_UPSTREAM=git://git.qemu.org/qemu.git OSSTEST_BASELINES_ONLY=y ./ap-fetch-version-old $branch
and
TREE_QEMU_UPSTREAM=git://git.qemu.org/qemu.git ./ap-fetch-version-old $branch
are consulting the correct trees (and produce the same answers) and that

./ap-fetch-version $branch is also correct in each case.

I have done a dummy cr-daily-branch qemu-mainline (with standalone make-flight) with baselines forced and it now appears correct.

---
We should consider force pushing to at least the mainline repo, if not the Cambridge instance too.

---
 ap-common            | 6 +++++-
 ap-fetch-version-old | 6 +++---
 2 files changed, 8 insertions(+), 4 deletions(-)
ap-common +5 -1
index 059b4b2..fc646ee 100644
@@ -85,10 +85,14 @@ fi
 
 : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27}
 
-: ${TREE_QEMU_UPSTREAM:=git://xenbits.xen.org/qemu-xen.git}
+: ${BASE_TREE_QEMU_UPSTREAM:=git://xenbits.xen.org/qemu-xen.git}
 : ${PUSH_TREE_QEMU_UPSTREAM=$XENBITS:/home/xen/git/qemu-xen.git}
 : ${LOCALREV_QEMU_UPSTREAM:=daily-cron.$branch}
 
+if [ "x${TREE_QEMU_UPSTREAM}" ]; then
+	: ${TREE_QEMU_UPSTREAM:=${BASE_TREE_QEMU_UPSTREAM}}
+fi
+
 : ${TREE_QEMU_MAINLINE:=git://git.qemu.org/qemu.git}
 
 info_linux_tree () {
ap-fetch-version-old +3 -3
index ef079ba..e2c6b3b 100755
@@ -61,17 +61,17 @@ xen-4.*-testing)
 	;;
 qemu-mainline)
         repo_tree_rev_fetch_git $branch \
-		$TREE_QEMU_UPSTREAM upstream-tested $LOCALREV_QEMU_UPSTREAM
+		$BASE_TREE_QEMU_UPSTREAM upstream-tested $LOCALREV_QEMU_UPSTREAM
         ;;
 qemu-upstream-unstable)
         repo_tree_rev_fetch_git $branch \
-		$TREE_QEMU_UPSTREAM master $LOCALREV_QEMU_UPSTREAM
+		$BASE_TREE_QEMU_UPSTREAM master $LOCALREV_QEMU_UPSTREAM
         ;;
 qemu-upstream-*-testing)
 	branchcore=${branch#qemu-upstream-}
 	branchcore=${branchcore%-testing}
         repo_tree_rev_fetch_git $branch \
-		$TREE_QEMU_UPSTREAM stable-$branchcore $LOCALREV_QEMU_UPSTREAM
+		$BASE_TREE_QEMU_UPSTREAM stable-$branchcore $LOCALREV_QEMU_UPSTREAM
         ;;
 linux)
 	repo_tree_rev_fetch_git linux \
Signature · 1 line
2.5.3
#1 lore raw

Ian Campbell writes ("[PATCH OSSTEST] ap-fetch-version-old: Fix qemu branch handling after mergin of qemu trees"):

Quoted 12 lines

ap-fetch-version-old should always reference the output gate, but 99e92a6b3991 "Switch to merged qemu-xen{,-traditional}.git trees" switched it to use TREE_QEMU_UPSTREAM directly, which can be overridden by cr-daily-branch. This broke at least when OSSTEST_BASELINES_ONLY=y since "cr-daily-branch qemu-mainline" ends up looking for an "upstream-tested" branch in the qemu.org git tree, when it should be looking at our output tree on xenbits.

Follow pattern of TREE_LINUX and set BASE_TREE_QEMU_UPSTREAM to the output gate and then conditionally set TREE_QEMU_UPSTREAM to the BASE_TREE if it is not already set. Switch ap-fetch-version-old to use BASE_TREE.

...

ap-common fi · line 94

Quoted 3 lines
ap-common +3 -0
+if [ "x${TREE_QEMU_UPSTREAM}" ]; then
+	: ${TREE_QEMU_UPSTREAM:=${BASE_TREE_QEMU_UPSTREAM}}
+fi

${FOO:=BAR} sets FOO iff FOO is unset or empty, so there is no need for the if. The place you cribbed this from also has to set a variable for the refname.

Everthing else about this is fine. Thanks for the in-person explanation.

Ian.

#2 lore raw
Quoted 11 lines · Ian Jackson

Ian Campbell writes ("[PATCH OSSTEST] ap-fetch-version-old: Fix qemu branch handling after mergin of qemu trees"):

Quoted 9 lines

ap-fetch-version-old should always reference the output gate, but 99e92a6b3991 "Switch to merged qemu-xen{,-traditional}.git trees" switched it to use TREE_QEMU_UPSTREAM directly, which can be overridden by cr-daily-branch. This broke at least when OSSTEST_BASELINES_ONLY=y since "cr-daily-branch qemu-mainline" ends up looking
for an "upstream-tested" branch in the qemu.org git tree, when it should be
looking at our output tree on xenbits.

You mentioned IRL that this also broke any cr-daily-branch which happened to want to do a baseline test on qemu-mainline. Since we never force push that tree it's unlikely this would have bitten us (just mentioning for completeness since it hasn't occurred to me).

Quoted 13 lines
Quoted 4 lines

Follow pattern of TREE_LINUX and set BASE_TREE_QEMU_UPSTREAM to the output gate and then conditionally set TREE_QEMU_UPSTREAM to the BASE_TREE if it is not already set. Switch ap-fetch-version-old to use BASE_TREE.

...

ap-common fi · line 94

Quoted 3 lines
ap-common +3 -0
+if [ "x${TREE_QEMU_UPSTREAM}" ]; then
+	: ${TREE_QEMU_UPSTREAM:=${BASE_TREE_QEMU_UPSTREAM}}
+fi

${FOO:=BAR} sets FOO iff FOO is unset or empty, so there is no need for the if. The place you cribbed this from also has to set a variable for the refname.

Quoted 1 line

Everthing else about this is fine. Thanks for the in-person explanation.

As discussed IRC I dropped the if/fi (and retested) and have force pushed to both the colo and the Cambridge instance.

I have removed the stop file from Cambridge.

Ian.