You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jaikiran Pai <ja...@gmail.com> on 2017/12/19 10:59:28 UTC

Re: ant git commit: logs say "link has been created", is it a timing issue?

The interesting bit from the logs that you enabled for investigating 
this appears to be the contents in the "recorded.links" properties file 
that gets created in the "test-record" target:

#listing properties#Tue Dec 19 09:28:22 UTC 2017
dirlink=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 
1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/dirlink
link2=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 
1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/link2
link1=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 
1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/link1
dirlink3=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 
1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/dirlink3
dirlink2=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 
1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/dirlink2

This is wrong - for some reason the link is pointing back itself (each 
entry in that file). For example "link1" is pointing to
/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 
1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/link1 
instead of pointing to the "file1". What this means is this line 
https://github.com/apache/ant/blob/master/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java#L265 
(the getCanonicalPath()) is returning the path which isn't "following" 
the link. Either that or the link itself is broken (i.e. the target 
file1 doesn't exist) - which is odd since before the code reaches here 
there are checks both in the targets and in Java code which check that 
file1 exists. Furthermore, given that this is manifesting for all the 
links in that properties file, it looks a very generic issue and not 
just to this specific "link1" symlink.

To make it much more weird, if I run this exact same state of "master" 
branch, by just triggering this single test case, it passes.

-Jaikiran



On 19/12/17 4:18 PM, bodewig@apache.org wrote:
> Repository: ant
> Updated Branches:
>    refs/heads/master 6aeb7d329 -> c2708623b
>
>
> logs say "link has been created", is it a timing issue?
>
>
> Project: http://git-wip-us.apache.org/repos/asf/ant/repo
> Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/c2708623
> Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/c2708623
> Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/c2708623
>
> Branch: refs/heads/master
> Commit: c2708623b83f93dba1bf46f744d9f6ecc145b691
> Parents: 6aeb7d3
> Author: Stefan Bodewig <bo...@apache.org>
> Authored: Tue Dec 19 11:47:37 2017 +0100
> Committer: Stefan Bodewig <bo...@apache.org>
> Committed: Tue Dec 19 11:47:37 2017 +0100
>
> ----------------------------------------------------------------------
>   src/etc/testcases/taskdefs/optional/unix/symlink.xml | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/ant/blob/c2708623/src/etc/testcases/taskdefs/optional/unix/symlink.xml
> ----------------------------------------------------------------------
> diff --git a/src/etc/testcases/taskdefs/optional/unix/symlink.xml b/src/etc/testcases/taskdefs/optional/unix/symlink.xml
> index 134f29f..d986e8b 100644
> --- a/src/etc/testcases/taskdefs/optional/unix/symlink.xml
> +++ b/src/etc/testcases/taskdefs/optional/unix/symlink.xml
> @@ -44,7 +44,7 @@
>          before they have finnished (hopefully). Tweak if needed.
>     -->
>   
> -  <property name="delay" value="0"/>
> +  <property name="delay" value="2"/>
>    
>     <import file="../../../buildfiletest-base.xml"/>
>   
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: ant git commit: logs say "link has been created", is it a timing issue?

Posted by Stefan Bodewig <bo...@apache.org>.
OK, I'm not listing the contents of the test dir

Content of
 /home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK
 1.8 (latest)/build/testcases/tmp/testoutput_19459_main/symtest1
is
/dirlink:/dirlink2/fileA:/dirlink2/fileB:/dirlink2/fileC:/dirlink3/file2:/dirlink3/link3:/dirlink3/recorded.links:/file1:/link1:/link2:/recorded.links:/symtest2/file2:/symtest2/link3:/symtest2/recorded.links:/symtest3/fileA:/symtest3/fileB:/symtest3/fileC

Unable to find /home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK 1.8 (latest)/build/testcases/tmp/testoutput_19459_main/symtest1/link1 to set property test.recreate.link1.recreated

So DirectoryScanner and Available disagree with each other.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: ant git commit: logs say "link has been created", is it a timing issue?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2017-12-19, Jaikiran Pai wrote:

> The interesting bit from the logs that you enabled for investigating
> this appears to be the contents in the "recorded.links" properties
> file that gets created in the "test-record" target:

> #listing properties#Tue Dec 19 09:28:22 UTC 2017
> dirlink=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK
> 1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/dirlink
> link2=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK
> 1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/link2
> link1=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK
> 1.8 (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/link1
> dirlink3=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK
> 1.8
> (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/dirlink3
> dirlink2=/home/jenkins/jenkins-slave/workspace/Ant-Build-Matrix-master-Linux/jdk/JDK
> 1.8
> (latest)/build/testcases/tmp/testoutput_3321_main/symtest1/dirlink2

> This is wrong - for some reason the link is pointing back itself (each
> entry in that file).

Ah interesting, I didn't catch that.

We should probably extend the test for record to actually look into the
file's content rather than just asserting something has been written.

> To make it much more weird, if I run this exact same state of "master"
> branch, by just triggering this single test case, it passes.

This is what happened to me on the Gump box as well.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org