How to get a failing test to reproduce a bug

36 views
Skip to first unread message

nudtdzy

unread,
Jul 27, 2011, 9:49:22 AM7/27/11
to iBugs
Hi,

For my research work, I need to get at least one failing test to
reproduce the bug and then run this failing test. How to get this
failing test for one bug listed in repository.xml? Is it in
<testsforfix> tag? I have tried for several sample bugs, by first
generating script using command gentestscript and then running
runtest.xml as instructed in README. But I get the same result for
all:
runtest:
[java] Pass Suite.Spec(....) 0 tests 0 seconds

there must be something wrong. Please help me.

Regards,
ziying

Valentin Dallmeier

unread,
Jul 27, 2011, 12:00:46 PM7/27/11
to ib...@googlegroups.com
Hi!

Yes, the failing tests (if any are present) are referenced in testsforfix . Can you paste the output of what you're doing?

Valentin


--
You received this message because you are subscribed to the Google Groups "iBugs" group.
To post to this group, send email to ib...@googlegroups.com.
To unsubscribe from this group, send email to ibugs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ibugs?hl=en.


nudtdzy

unread,
Jul 27, 2011, 10:53:19 PM7/27/11
to iBugs
Hi,

Below is the commands and outputs.

1. First, I check out version of bug 42993. everything seems ok:

........
[java] A versions\42993\post-fix\testresults.xml
[java] Export complete.

init-properties:

prepareversion:

BUILD SUCCESSFUL
Total time: 34 seconds

2. Then I build pre-fix version. everything seems ok except this
fragment:

..............
[exec] api:
[exec] [mkdir] Created dir: D:\ibugs_aspectj-1.3\versions
\42993\pre-fix\org.aspectj\modules\aj-build\dist\docs\
doc\api
[exec] [javadoc] Generating Javadoc
[exec] [javadoc] Javadoc execution
[exec] [javadoc] Loading source files for package
org.aspectj.lang...
[exec] [javadoc] Loading source files for package
org.aspectj.lang.reflect...
[exec] [javadoc] Constructing Javadoc information...
[exec] [javadoc] javadoc: Error fetching URL:
http://java.sun.com/j2se/1.4.2/docs/api/package-list
[exec] [javadoc] Standard Doclet version 1.4.2_19
[exec] [javadoc] Building tree for all the packages and
classes...
[exec] [javadoc] Building index for all the packages and
classes...
[exec] [javadoc] Building index for all classes...
[exec] [javadoc] D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\runtime\src\org\aspectj\lang\Sig
nature.java:44: warning - Tag @see: reference not found:
java.lang.reflect.Member
[exec] [javadoc] D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\runtime\src\org\aspectj\lang\Sig
nature.java:44: warning - Tag @see: reference not found:
java.util.logging.Logger
[exec] [javadoc] D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\runtime\src\org\aspectj\lang\Sig
nature.java:63: warning - Tag @see: reference not found:
java.lang.reflect.Member#getName
[exec] [javadoc] D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\runtime\src\org\aspectj\lang\Sig
nature.java:80: warning - Tag @see: reference not found:
java.lang.reflect.Member#getModifiers
[exec] [javadoc] D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\runtime\src\org\aspectj\lang\Sig
nature.java:80: warning - Tag @see: reference not found:
java.lang.reflect.Modifier
[exec] [javadoc] D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\runtime\src\org\aspectj\lang\Sig
nature.java:94: warning - Tag @see: reference not found:
java.lang.reflect.Member#getDeclaringClass
[exec] [javadoc] Generating D:\ibugs_aspectj-1.3\versions
\42993\pre-fix\org.aspectj\modules\aj-build\dist\docs\do
c\api\stylesheet.css...
[exec] [javadoc] 1 error
[exec] [javadoc] 6 warnings
........................

[exec] all:

[exec] BUILD SUCCESSFUL
[exec] Total time: 24 seconds

BUILD SUCCESSFUL
Total time: 24 seconds

3. Then I build tests. This seems problematic. part of its output is:

......................
[exec] init-version:

[exec] build-module-all:
[exec] [ajbuild] unable to build <bad BuildSpec - baseDir=D:
\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspect
j\modules jarDir=D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\aj-build\jars buildConfig=verbose> usin
g script: D:\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj
\modules\build\build.xml
[exec] assembling all testing-drivers in D:
\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules\aj-build
\j
ars\testing-drivers-all.jar
[exec] knownAntecedants: [D:\ibugs_aspectj-1.3\versions\42993\pre-
fix\org.aspectj\modules\lib\junit\junit.jar, D:\i
bugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules\lib\commons
\commons.jar, D:\ibugs_aspectj-1.3\versions\42993
\pre-fix\org.aspectj\modules\aj-build\jars\bridge.jar, D:
\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules\a
j-build\jars\util.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\aj-build\jars\weaver.jar, D:\ibug
s_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules\lib\bcel
\bcel.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix\
org.aspectj\modules\aj-build\jars\testing-util.jar, D:
\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules\lib\
jdiff\jdiff.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\aj-build\jars\asm.jar, D:\ibugs_aspectj
-1.3\versions\42993\pre-fix\org.aspectj\modules\aj-build\jars
\testing.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix\o
rg.aspectj\modules\lib\ant\lib\ant.jar, D:\ibugs_aspectj-1.3\versions
\42993\pre-fix\org.aspectj\modules\lib\regexp\jakar
ta-regexp-1.2.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\lib\ant\lib\xercesImpl.jar, D:\ibugs_
aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules\lib\ant\lib\xml-
apis.jar, D:\ibugs_aspectj-1.3\versions\42993\pre
-fix\org.aspectj\modules\aj-build\jars\testing-client.jar, D:
\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modul
es\aj-build\jars\ajde.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\aj-build\jars\org.aspectj.ajd
t.core.jar, D:\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj
\modules\aj-build\jars\org.eclipse.jdt.core.jar, D:\i
bugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj\modules
\org.eclipse.jdt.core\jdtcore-for-aspectj.jar, D:\ibugs_aspec
tj-1.3\versions\42993\pre-fix\org.aspectj\modules\aj-build\jars
\taskdefs.jar]
[exec] [ajbuild-zip] Building zip: D:\ibugs_aspectj-1.3\versions
\42993\pre-fix\org.aspectj\modules\aj-build\jars\te
sting-drivers-all.jar

[exec] BUILD SUCCESSFUL
[exec] Total time: 12 seconds

BUILD SUCCESSFUL
Total time: 12 seconds

This "unable to build <bad BuildSpec" also appears several times at
other places.

4. Then I generate test script:
D:\ibugs_aspectj-1.3>ant -DfixId=42993 -Dtag=pre-fix -
DtestFileName="org.aspectj/modules/tests/ajcTests.xml" -DtestName=
"Interaction between pointcut binding and declare parents" -DjvmArgs=-
Xmx512m gentestscript

Output:

Buildfile: build.xml

init-properties:

checkDefaultParams:

gentestscript:
[java] Generating tests in D:\ibugs_aspectj-1.3\versions
\42993\pre-fix\org.aspectj\modules\tests
[java] Reading xml test from file D:\ibugs_aspectj-1.3\versions
\42993\pre-fix\org.aspectj\modules\tests\ajcTests.xm
l fallback D:\ibugs_aspectj-1.3\versions\42993\pre-fix\org.aspectj
\modules\tests\ajcTests.xml

BUILD SUCCESSFUL
Total time: 0 seconds

5. At last I run this test. Results are:

Buildfile: versions\42993\pre-fix\org.aspectj\modules\tests
\runtest.xml

runtest:
[java] PASS Suite.Spec(D:\ibugs_aspectj-1.3\versions\42993\pre-fix
\org.aspectj\modules\tests) 0 tests 0 seconds

BUILD SUCCESSFUL
Total time: 1 second

There must be something wrong.

Regards,
ziying

On 7月28日, 上午12时00分, Valentin Dallmeier <valentin.dallme...@gmail.com>
wrote:
> >http://groups.google.com/group/ibugs?hl=en.- 隐藏被引用文字 -
>
> - 显示引用的文字 -

Valentin Dallmeier

unread,
Jul 29, 2011, 4:06:51 AM7/29/11
to ib...@googlegroups.com
Hi!

Some things in AspectJ's build process fail, but that's usually not a problem. From the output I think that building tests and everything is okay. It seems like the generated test file is empty, which usually happens because either the name of the test file or the test name is wrong. Can you please double check that those are correct? You should also try other tests.

Regards,

Valentin

2011/7/28 nudtdzy <nud...@sina.com>
Reply all
Reply to author
Forward
0 new messages