Summary: | DAHTOOL-00050: [patch] dahdi_test accurately reports nonsense | ||
Reporter: | Matthias Urlichs (smurfix) | Labels: | |
Date Opened: | 2011-01-04 06:22:07.000-0600 | Date Closed: | 2011-09-11 00:15:59 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Utilities |
Versions: | 2.4.0 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ( 0) 0001-dahdi_test-Enforce-range-from-0.0-100.0-for-accuracy.patch | |
Description: | dahdi_test reports -200% or 400% accuracy. That's clearly stupid. Also, the percentage printed in verbose mode clearly doesn't match the one printed in terse mode. SVN trunk as of last week. ****** ADDITIONAL INFORMATION ****** root@lab# dahdi_test Opened pseudo dahdi interface, measuring accuracy... -200.014% -200.008% -200.012% -200.011% -200.012% -200.012% -200.013% -200.013% -200.013% -200.014% -200.008% -200.012% -200.013% -200.013% -200.011% -200.013% -200.012% -200.012% ^C --- Results after 18 passes --- Best: 0.000 -- Worst: -200.014 -- Average: -200.012032, Difference: 400.012032 root@lab:/var/lib/dkms/dahdi/2.3+svn-smurf2/build# dahdi_test -v Opened pseudo dahdi interface, measuring accuracy... 8192 samples in 32769.188 system clock sample intervals (400.014%) 8192 samples in 32768.566 system clock sample intervals (400.007%)^C --- Results after 2 passes --- Best: 0.000 -- Worst: -200.014 -- Average: -200.010704, Difference: 400.010705 root@lab:/var/lib/dkms/dahdi/2.3+svn-smurf2/build# lsmod Module Size Used by dahdi_transcode 5542 0 dahdi_dummy 2437 0 dahdi 186362 2 dahdi_transcode,dahdi_dummy | ||
Comments: | By: Shaun Ruffell (sruffell) 2011-01-04 10:57:21.000-0600 Something is wrong on your system: With a default build today: [root@foxtrot dahdi-linux]# /etc/init.d/dahdi stop Unloading DAHDI hardware modules: done [root@foxtrot dahdi-linux]# modprobe dahdi [root@foxtrot dahdi-linux]# cat /sys/module/dahdi/version SVN-trunk-r9614 [root@foxtrot dahdi-linux]# dahdi_test& sleep 6; killall dahdi_test [1] 9841 Opened pseudo dahdi interface, measuring accuracy... 100.000% 99.996% 99.999% 99.999% 99.999% [1]+ Terminated dahdi_test [root@foxtrot dahdi-linux]# dahdi_test -v & sleep 6; killall dahdi_test [1] 9870 Opened pseudo dahdi interface, measuring accuracy... 8192 samples in 8191.967 system clock sample intervals (100.000%) 8192 samples in 8191.648 system clock sample intervals (99.996%) 8192 samples in 8191.888 system clock sample intervals (99.999%) 8192 samples in 8191.913 system clock sample intervals (99.999%) 8192 samples in 8191.888 system clock sample intervals (99.999%)[1]+ Terminated dahdi_test -v [root@foxtrot dahdi-linux]# If I increase the chunksize from 8 to 40 the accuracy of any specific period goes down, but with the -v option you can see that over time it's balanced around where it should be. [root@foxtrot dahdi-linux]# /etc/init.d/dahdi stop Unloading DAHDI hardware modules: done [root@foxtrot dahdi-linux]# modprobe dahdi [root@foxtrot dahdi-linux]# cat /sys/module/dahdi/version SVN-trunk-r9614M [root@foxtrot dahdi-linux]# dahdi_test& sleep 6; killall dahdi_test [1] 10804 Opened pseudo dahdi interface, measuring accuracy... 99.903% 99.606% 99.904% 99.903% 99.903% [1]+ Terminated dahdi_test [root@foxtrot dahdi-linux]# dahdi_test -v& sleep 6; killall dahdi_test [1] 10833 Opened pseudo dahdi interface, measuring accuracy... 8192 samples in 8199.977 system clock sample intervals (100.097%) 8192 samples in 8159.704 system clock sample intervals (99.606%) 8192 samples in 8199.896 system clock sample intervals (100.096%) 8192 samples in 8199.904 system clock sample intervals (100.096%) 8192 samples in 8199.896 system clock sample intervals (100.096%)[1]+ Terminated dahdi_test -v [root@foxtrot dahdi-linux]# Are you running dynamic spans or something? What is the output of dahdi_scan? By: Shaun Ruffell (sruffell) 2011-01-04 11:03:31.000-0600 (but yes...I'll agree that the non-verbose mode should be reporting 400% in your case, and not a negative percentage) By: Matthias Urlichs (smurfix) 2011-01-04 14:23:31.000-0600 # dahdi_test -v& sleep 6; killall dahdi_test Hmm, isn't that what "dahdi_test -c5" is supposed to do? ;-) Anyway: root@lab:~# dahdi_scan [1] active=yes alarms=UNCONFIGURED description=DAHDI_DUMMY/1 (source: HRtimer) 1 name=DAHDI_DUMMY/1 manufacturer= devicetype=DAHDI Dummy Timing location= basechan=1 totchans=0 irq=0 root@lab:~# So it seems that a broken patch in my build script mistakenly enabled dahdi_dummy, and that dahdi_dummy is currently not only out-of-date but broken. My bad. root@lab:~# rmmod dahdi_dummy root@lab:~# dahdi_test -v -c5 Opened pseudo dahdi interface, measuring accuracy... 8192 samples in 8191.384 system clock sample intervals (99.992%) 8192 samples in 8190.648 system clock sample intervals (99.983%) 8192 samples in 8191.256 system clock sample intervals (99.991%) 8192 samples in 8191.128 system clock sample intervals (99.989%) 8192 samples in 8191.136 system clock sample intervals (99.989%) --- Results after 5 passes --- Best: 99.992 -- Worst: 99.983 -- Average: 99.989207, Difference: 99.989208 OK, so now please fix the "Difference:" part of the result. :-P By: Shaun Ruffell (sruffell) 2011-01-04 16:19:54.000-0600 I just dropped the "Difference" field in the attached past...and bounded the range from 0 - 100% in the attached 0001-dahdi_test-Enforce-range-from-0.0-100.0-for-accuracy.patch I also added a "cummulative" accuracy when running in verbose mode to smooth out jitter in each pass (larger chunksizes == more jitter). Thoughts? By: Shaun Ruffell (sruffell) 2011-04-18 10:35:50 @smurfix: Are you going to test this? |