Weirdest bug yet.

Eric S. Raymond esr at thyrsus.com
Thu Jul 7 09:35:53 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> 
> No rawstats or protostats either.

Yeah, that was a different problem.  I reverted us to a good state and
am investigating this.

> Remember the saveconfigandquit stuff you ripped out?  That would have caught 
> this.  (if we had used it)
> 
> How are we going to test the parser?

It is true that right now we don't have a systematic way to do that.  There
is a case, then, for restoring that code.  It can be done.

> Can we replace ntp_config (and most of ntpd) with a skeleton that catches all 
> the call-outs and prints stuff?

Yes, but I don't think it will be necessary this time.  I found what was
confusing the grammar and fixed it.

> Are there any other aliases in the grammer?

No.  It turns out to be unpredictable whether an alias will make the FSM
choke.  I found cases where it doesn't - for example, aliasing "subtype"
to T_Preempt (other value picked at random, first one I tried) works
OK even though aliasing to T_Mode does not.  The contents of the alias string,
on the other hand, seems not to matter.

> Ahh.  I see this in ntpd/keyword-gen.c
> { "subtype",            T_Mode,                 FOLLBY_TOKEN },
> 
> How about making a T_Subtype and adding it to ntpd/ntp_parser.y so that it 
> does the same thing?

Already done. That works.  I'm now restoring the documentation update to go with
"subtype".  Then I'll figure out what busted the other logging before (it's
working fine now).

In case it isn't obvious, the purpose of the "subtype" change is to allow
the new config syntax to have a way to do device type selection that doesn't
overload the "mode" word.  I think "mode" is better reserved for uses like
setting the NMEA sentence mix in nmea.

I'm also still considering adding a "speed" option.  Relatively few
drivers could use it (nmea, generic, chu, hpgps, and jjy) but for those
I think it would be clarifying.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list