The root cause:
We added too many variable assignments in BEGIN block, and out of default auto configured variable buffer space. The test VM has 4G RAM which should be enough for most cases so it's reasonable to increase limitation to these cases.
To fix:
+#pragma D option dynvarsize=2m
in both cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d & cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d
But this only makes the current way of test pass, it does not do the real test. The output of tst.basename.d is another test script, and needs to be run and check its return value is 0. The test infrastructure needs to be changed for this kind of tests.
To reproduce:
If we directly run:
The root cause: We added too many variable assignments in BEGIN block, and out of default auto configured variable buffer space. The test VM has 4G RAM which should be enough for most cases so it's reasonable to increase limitation to these cases.
To fix:
in both cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d & cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d
But this only makes the current way of test pass, it does not do the real test. The output of tst.basename.d is another test script, and needs to be run and check its return value is 0. The test infrastructure needs to be changed for this kind of tests.