-
Notifications
You must be signed in to change notification settings - Fork 275
Tests for JBMC classpath problems #2733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.diffblue; | ||
|
||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
assert true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
KNOWNBUG | ||
Test.class | ||
--classpath src | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the expected return code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
^EXIT=6$ | ||
-- | ||
Java main class: Test | ||
failed to open input file `Test.class' | ||
-- | ||
Test.class is not in the right directory corresponding to its package. | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
TestJar.foo(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class TestJar | ||
{ | ||
public static void foo() | ||
{ | ||
assert false; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
Test.class | ||
--classpath `../../../../scripts/format_classpath.sh src.jar .` | ||
^EXIT=10$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
^warning: ignoring |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
assert false; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
assert true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
CORE | ||
test.class | ||
-classpath my_cp:. | ||
Test.class | ||
--classpath src | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CORE symex-driven-lazy-loading-expected-failure | ||
Test.class | ||
--classpath wrong | ||
^EXIT=6$ | ||
^SIGNAL=0$ | ||
the program has no entry point | ||
-- | ||
-- | ||
We override the default path. Hence, Test cannot be found. | ||
Currently fails because symex-driven lazy-loading aborts without an error message. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this only fails with symex-driven lazy-loading, you can mark that test as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
KNOWNBUG | ||
src/Test.class | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add expected return code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
^EXIT=6$ | ||
-- | ||
Parsing src/Test.class | ||
-- | ||
Test class is not in src package. Therefore, this must fail. | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
test.class | ||
--classpath `../../../../scripts/format_classpath.sh my_cp .` | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL$ | ||
-- | ||
^warning: ignoring |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
KNOWNBUG | ||
Test.class | ||
--classpath ./NotHere.jar | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^Warning: file './NotHere.jar' does not exist$ | ||
-- | ||
-- | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
KNOWNBUG | ||
Test.class | ||
--classpath `../../../../scripts/format_classpath.sh ./NotHere .` | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^Warning: path './NotHere' does not exist$ | ||
-- | ||
-- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.diffblue; | ||
|
||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
assert true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
KNOWNBUG | ||
Test.class | ||
--classpath test.jar | ||
^EXIT=6$ | ||
-- | ||
Java main class: Test | ||
failed to open input file `Test.class' | ||
-- | ||
Test.class is not in the right directory corresponding to its package. | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
KNOWNBUG | ||
test.jar | ||
--main-class Test.class | ||
^EXIT=6$ | ||
-- | ||
Java main class: Test | ||
failed to open input file `Test.class' | ||
-- | ||
Test.class is not in the right directory corresponding to its package. | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
C.jar | ||
--function jarfile3.f -classpath `../../../../scripts/format_classpath.sh A.jar B.jar` | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION SUCCESSFUL | ||
-- | ||
^warning: ignoring |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
Test2.foo(); | ||
assert true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Test2 | ||
{ | ||
public static void foo() | ||
{ | ||
assert false; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
Test.class | ||
|
||
^EXIT=10$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
-- | ||
Test2 is found because . is default classpath. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
KNOWNBUG | ||
Test.class | ||
Test2.class | ||
^EXIT=6$ | ||
-- | ||
Invariant check failed | ||
-- | ||
We don't allow two classes passed on the command line. | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Test | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
Test2.foo(); | ||
assert true; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class Test2 | ||
{ | ||
public static void foo() | ||
{ | ||
assert false; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
libs/test.jar | ||
--main-class Test --classpath lib/test2.jar | ||
^EXIT=10$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
-- | ||
This is a correct way of dealing with two jars. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CORE | ||
lib/test2.jar | ||
--main-class Test --classpath libs/test.jar | ||
^EXIT=10$ | ||
^VERIFICATION FAILED$ | ||
-- | ||
-- | ||
This is a correct way of dealing with two jars. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
KNOWNBUG | ||
libs/test.jar | ||
lib/test2.jar --main-class Test.class | ||
^EXIT=6$ | ||
-- | ||
Invariant check failed | ||
the program has no entry point | ||
-- | ||
We don't allow two jar files passed on the command line. | ||
Issue: 2864 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
KNOWNBUG | ||
Test.class | ||
--classpath `../../../../scripts/format_classpath.sh libs/test.jar lib/test2.jar` | ||
^EXIT=6$ | ||
-- | ||
-- | ||
This is incorrect as it would search for a Test.class file outside the jar files. | ||
Issue: 2864 |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the actual behaviour? Is there a bug ticket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done #2864