Subject: | Test-Smoke smoked incorrect branch |
Date: | Mon, 5 Nov 2018 18:02:26 -0500 |
To: | bug-Test-Smoke [...] rt.cpan.org |
From: | James E Keenan <jkeenan [...] pobox.com> |
Once again I have to report a situation where Test-Smoke did not smoke
the branch I requested.
I reported an instance of this problem several months ago as "Problem 2"
in https://rt.cpan.org/Ticket/Display.html?id=125927. Most of my
subsequent posts in that ticket concerned "Problem 1". I haven't had a
response to either problem, but since Problem 2 has reoccurred let's put
all discussion of that problem in one new ticket. My original statement
of Problem 2 is attached.
Here is the new instance.
I manually kick off smoke-test runs of blead and other branches on a
FreeBSD-11.2-STABLE host, 'perlmonger.nycbug.org'. The 2 most recent
runs on that platform (as of the composition of this message, and as
displayed at http://perl5.test-smoke.org/search with appropriate
drop-down selections) are:
#####
URL|Git-id|Branch|Smoke date|Status
http://perl5.test-smoke.org/report/73583|v5.29.4-34-g328d907979|blead|2018-11-05
00:23:31+00|PASS
http://perl5.test-smoke.org/report/73607|v5.26.2-85-gadf1b5d28a|smoke-me/jkeenan/cleanup-t-io-fs|2018-11-05
13:07:31+00|PASS
#####
Now, just looking at that, you might wonder about the "v5.26.2" in the
Git-id of run 73607. For one thing, another run on that page lists a
run of the "smoke-me/jkeenan/cleanup-t-io-fs" branch but with a Git-id
beginning "v5.29.4".
#####
URL|Git-id|Branch|Smoke date|Status
http://perl5.test-smoke.org/report/73178|v5.29.4-22-g167698623c|smoke-me/jkeenan/cleanup-t-io-fs|2018-10-29
22:40:15+00|PASS
#####
Here's the problem: What I *wanted* to test earlier today was the
'maint-5.26' branch, *not* the smoke-me/jkeenan/cleanup-t-io-fs branch.
In my 'smokecurrent.gitbranch' file the first 3 entries at the point
when I kicked off the smoke-test run were:
#####
maint-5.26
blead
smoke-me/jkeenan/cleanup-t-io-fs
#####
(See tarball attached for
'defective-20181105/adf1b5d2/smokecurrent.gitbranch' and other files
subsequently mentioned in this report.)
Suppose that I go into the 'git-perl' directory of my Test-Smoke rig and
call 'git status'. As recorded in
defective-20181105/adf1b5d2/git-perl.git.status.txt, I get:
#####
On branch maint-5.26
Your branch is up to date with 'origin/maint-5.26'.
nothing to commit, working tree clean
#####
Everything fine there. Now supposed I go next door to the
'perl-current' directory in which the run is executed. As recorded in
defective-20181105/adf1b5d2/perl-current.git.status.txt, I get:
#####
$ cat perl-current.git.status.txt
On branch smoke-me/jkeenan/cleanup-t-io-fs
Your branch and 'origin/smoke-me/jkeenan/cleanup-t-io-fs' have diverged,
and have 323 and 3496 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: patchlevel.h
Untracked files:
(use "git add <file>..." to include in what will be committed)
mktest.jsn
mktest.out
mktest.rpt
patchlevel.bak
no changes added to commit (use "git add" and/or "git commit -a")
#####
Big problem! The 'perl-current' directory was not updated to hold
'maint-5.26'. Worse, it's not even holding blead any more. For some
reason it appears to have done a checkout of a branch from more than a
week ago!
We can also spot problems developing in the log file. I've included
both the full .log file and a 'head' of it in the tarball. If we look
at defective-20181105/adf1b5d2/adf1b5d2.head.log, we see:
#####
[2018-11-05 13:07:26+0000] ==> Starting synctree
[2018-11-05 13:07:26+0000] qx[/usr/local/bin/git remote update --prune 2>&1]
[2018-11-05 13:07:28+0000] qx[/usr/local/bin/git checkout maint-5.26
[2018-11-05 13:07:28+0000] 2>&1]
Switched to a new branch 'maint-5.26'
[2018-11-05 13:07:29+0000] qx[/usr/local/bin/git reset --hard
origin/maint-5.26
[2018-11-05 13:07:29+0000] 2>&1]
[2018-11-05 13:07:29+0000] qx[/usr/local/bin/git clean -dfx 2>&1]
[2018-11-05 13:07:29+0000] qx[/usr/local/bin/git fetch origin 2>&1]
[2018-11-05 13:07:30+0000] qx[/usr/local/bin/git checkout maint-5.26
[2018-11-05 13:07:30+0000] 2>&1]
#####
So far so good.
#####
error: Your local changes to the following files would be overwritten by
checkout:
patchlevel.h
Please commit your changes or stash them before you switch branches.
Aborting
#####
I get that on every smoke test run.
#####
[2018-11-05 13:07:30+0000] qx[/usr/local/bin/git reset --hard
origin/maint-5.26
[2018-11-05 13:07:30+0000] 2>&1]
[2018-11-05 13:07:31+0000] qx[/usr/local/bin/perl5
Porting/make_dot_patch.pl > .patch]
[2018-11-05 13:07:31+0000] /home/jkeenan/p5smoke/perl-current is now up
to patchlevel adf1b5d28a4fd0e20bbbb72cab062fdd520cb065
#####
Everything *looks* good here. Commit adf1b5d28 was the then-current head
of the maint-5.26 branch:
#####
commit adf1b5d28a4fd0e20bbbb72cab062fdd520cb065 (origin/maint-5.26)
Author: Steve Hay <steve.m.hay@googlemail.com>
AuthorDate: Sun Nov 4 20:55:50 2018 +0000
Commit: Steve Hay <steve.m.hay@googlemail.com>
CommitDate: Sun Nov 4 20:55:50 2018 +0000
Import perl5280delta.pod
#####
Continuing:
#####
[2018-11-05 13:07:31+0000] ==> Starting runsmoke
[2018-11-05 13:07:31+0000] [./tssmokeperl.pl]
chdir(/home/jkeenan/p5smoke/perl-current)
[2018-11-05 13:07:31+0000] Setup alarm: Mon Nov 5 19:07:31 2018
[2018-11-05 13:07:31+0000] qx[/usr/local/bin/perl5 -e "require
q[/home/jkeenan/p5smoke/perl-current/cpan/Test-Harness/lib/Test/Harness.pm];print
Test::Harness->VERSION" 2>&1]
[2018-11-05 13:07:31+0000] Found: Test::Harness version 3.38.
[2018-11-05 13:07:31+0000] Reading build configurations from
/home/jkeenan/p5smoke/perlcurrent.cfg
[2018-11-05 13:07:31+0000] Reading 'Policy.sh' from default content (v=1)
[2018-11-05 13:07:31+0000] Running test suite only with 'harness'
[2018-11-05 13:07:31+0000] make distclean ...
[2018-11-05 13:07:31+0000] Smoking patch
adf1b5d28a4fd0e20bbbb72cab062fdd520cb065 v5.26.2-85-gadf1b5d28a
#####
Again, everything *looks* good. But on the very next line we see:
#####
[2018-11-05 13:07:31+0000] Smoking branch smoke-me/jkeenan/cleanup-t-io-fs
#####
Where did that come from?
I grepped in the source code for those log messages and found this:
#####
$ ack 'Smoking (branch|patch)' lib/Test
lib/Test/Smoke.pm
179: $smoker->ttylog("Smoking patch $patch->[0] $patch->[1]\n");
180: $smoker->ttylog("Smoking branch $patch->[2]\n") if $patch->[2];
lib/Test/Smoke/Reporter.pm
272: if (/^Smoking branch (\S+)/) {
lib/Test/Smoke/App/RunSmoke.pm
103: $smoker->ttylog("Smoking patch $patch->[0]
@{[$patch->[1]||'']}\n");
104: $smoker->ttylog("Smoking branch $patch->[2]\n") if $patch->[2];
#####
Now, I don't know whether the smoke run was working in lib/Test/Smoke.pm
or lib/Test/Smoke/App/RunSmoke.pm. But it appears that in either case
$patch is a hashref which is populated by reading a hidden file in the
perl-current directory: .patch. I've included that in the tarball but
for visibility I've called in 'dot.patch'. For the problematic
smoke-test run its contents were:
#####
smoke-me/jkeenan/cleanup-t-io-fs 2018-11-04.20:55:50
adf1b5d28a4fd0e20bbbb72cab062fdd520cb065 v5.26.2-85-gadf1b5d28a
#####
Splitting on the whitespace, we have:
* The name of the branch that got smoked -- but which was not the branch
designated in smokecurrent.gitbranch.
* A datestamp which I think was the time of the *start* of the
*previous* smoke run, i.e., the run reported in
http://perl5.test-smoke.org/report/73583.
* The SHA of head of the branch which *should have been run* but which
was not.
* The Git-id of the SHA in the preceding item.
This discrepancy is also reflected in the other files output by
Test-Smoke in the problematic run. For example, in
defective-20181105/adf1b5d2/outadf1b5d28a4fd0e20bbbb72cab062fdd520cb065.out,
we have:
#####
Smoking patch adf1b5d28a4fd0e20bbbb72cab062fdd520cb065
v5.26.2-85-gadf1b5d28a
Smoking branch smoke-me/jkeenan/cleanup-t-io-fs
#####
The "patch" line reports the SHA and Git-id of the branch I wanted to
smoke. The "branch" line shows the branch actually and mistakenly smoked.
This is as far as I've been able to diagnose this so far. Since I want
to resume smoke-testing blead on this machine, I'll soon be overwriting
the contents of my 'git-perl' and 'perl-current' directories. I will do
that in 24 hours, so that if there's any information you need from those
directories that I have not already provided in the tarball, please let
me know ASAP.
Thank you very much.
Jim Keenan
Message body not shown because it is not plain text.
Message body is not shown because sender requested not to inline it.