Skip to content

Commit

Permalink
test, options: work around a subtle lexer bug
Browse files Browse the repository at this point in the history
The err.pspec-default test hits a horrible eleven-year-old bug in the
lexer (related to the move to flex from AT&T lex) which is triggering
the printing of garbage instead of a nice syntax error when in state 0
(possible probe name) and a type name is encountered, and its
second-to-last character is a *, and we are otherwise at EOF.

Let's fix this obscure monster in the next release and just evade it for
now.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
nickalcock authored and kvanhees committed May 31, 2023
1 parent ded09d0 commit ae9f2a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/unittest/options/err.pspec-default.r
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-- @@stderr --
dtrace: failed to compile script test/unittest/options/err.pspec-default.d: line 14: syntax error near end-of-input
dtrace: failed to compile script test/unittest/options/err.pspec-default.d: line 14: syntax error near
4 changes: 4 additions & 0 deletions test/unittest/options/err.pspec-default.r.p
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sed -f
# Chop off everything after the 'near' in the error message, to evade a bug
# at EOF in our scanner under flex < 2.6.
s/syntax error near.*$/syntax error near/g

0 comments on commit ae9f2a1

Please sign in to comment.