cadets / freebsd-old

FreeBSD src tree http://www.FreeBSD.org/
Other
12 stars 7 forks source link

Test timeout & does not do the real test: common.funcs.t_dtrace_contrib.tst_basename_d & common.funcs.t_dtrace_contrib.tst_cleanpath_d #77

Closed lwhsu closed 6 years ago

lwhsu commented 7 years ago

To reproduce:

/usr/tests/cddl/usr.sbin/dtrace # kyua debug common/funcs/t_dtrace_contrib:tst_basename_d
/usr/tests/cddl/usr.sbin/dtrace # kyua debug common/funcs/t_dtrace_contrib:tst_cleanpath_d
(timeout after 300s)

If we directly run:

# dtrace -C -s /usr/tests/cddl/usr.sbin/dtrace/common/funcs/tst.basename.d
# dtrace -C -s /usr/tests/cddl/usr.sbin/dtrace/common/funcs/tst.cleanpath.d
dtrace: buffer size lowered to 2m
dtrace: 1 dynamic variable drop
(hangs)

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.

lwhsu commented 7 years ago

https://reviews.freebsd.org/D11674

lwhsu commented 7 years ago

https://reviews.freebsd.org/D11675

lwhsu commented 7 years ago

https://reviews.freebsd.org/D11676

lwhsu commented 6 years ago

https://reviews.freebsd.org/D11716

lwhsu commented 6 years ago

fixed in r321467, r321468, r321472.