Alex Light | f2f1c9d | 2017-03-15 15:35:46 +0000 | [diff] [blame] | 1 | Tests basic functions in the jvmti plugin. |
| 2 | |
| 3 | This tests that we are able to redefine methods/constructors on the |
| 4 | java.lang.Object class at runtime. |
| 5 | |
| 6 | This also (indirectly) tests that we correctly handle reading annotations on |
| 7 | obsolete methods. This is something that is not normally done since there is no |
| 8 | way to get a reference to an obsolete method outside of the runtime but some |
| 9 | annotations on the Object class are read by the runtime directly. |
| 10 | |
| 11 | NB This test cannot be run on the RI at the moment. |
| 12 | |
| 13 | If this test starts failing during the doCommonClassRedefinition call it is |
| 14 | possible that the definition of Object contained in the base64 DEX_BYTES array |
| 15 | has become stale and will need to be recreated. The only difference from the |
| 16 | normal Object dex bytes is that (a) it contains only the bytes of the Object |
| 17 | class itself, and (b) it adds an |
| 18 | 'invoke-static {p0}, Ljava/lang/Object;->NotifyConstructed(Ljava/lang/Object;)V' |
| 19 | to the <init> function. |
| 20 | |
| 21 | It is also possible it could fail due to the pattern of allocations caused by |
| 22 | doing string concatenation or printing changing. In this case you should simply |
Roland Levillain | a073f46 | 2020-10-28 12:48:24 +0000 | [diff] [blame] | 23 | update the expected-stdout.txt file. |