Bug 216891

Summary: usr.bin/yacc/yacc_tests:main fails with expr.oxout.y
Product: Base System Reporter: Enji Cooper <ngie>
Component: testsAssignee: Enji Cooper <ngie>
Status: Closed FIXED    
Severity: Affects Some People CC: jkim
Priority: --- Flags: ngie: mfc-stable11+
ngie: mfc-stable10-
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Enji Cooper freebsd_committer freebsd_triage 2017-02-07 18:27:07 UTC
This failure is occurring post-r313106 (the yacc upgrade).

% kyua debug -k /usr/tests/usr.bin/yacc/Kyuafile yacc_tests:main
...
** testing ./expr.oxout.y
...ok ./yacc/expr.oxout.error
...ok ./yacc/expr.oxout.output
...diff ./yacc/expr.oxout.tab.c
--- ./yacc/expr.oxout.tab.c     2017-02-07 18:24:44.054689000 +0000
+++ ./yacc/test-expr.oxout.tab.c        2017-02-07 18:24:45.198970000 +0000
@@ -178,7 +178,7 @@
 #define ID 257
 #define CONST 258
 #define YYERRCODE 256
-typedef short YYINT;
+typedef int YYINT;
 static const YYINT expr.oxout_lhs[] = {                  -1,
     2,    0,    1,    3,    3,    3,    3,    3,    3,    3,
 };
...
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2017-02-07 18:33:23 UTC
Huh... this seems to tie into this change:

------------------------------------------------------------------------
r274475 | jkim | 2014-11-13 09:54:17 -0800 (Thu, 13 Nov 2014) | 4 lines

Regen test cases for yacc(1) after r274460.  YYINT is int now.

PR:             194982
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-02-07 18:38:22 UTC
A commit references this bug:

Author: ngie
Date: Tue Feb  7 18:37:46 UTC 2017
New revision: 313398
URL: https://svnweb.freebsd.org/changeset/base/313398

Log:
  Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD

  YYINT on FreeBSD is int, not short

  I'll work with the upstream maintainer or come up with a build
  method of modifying their definitions on install instead of
  having to modify tests to match our forked YYINT definition.

  PR:		216891
  Sponsored by:	Dell EMC Isilon

Changes:
  head/contrib/byacc/test/yacc/expr.oxout.tab.c
Comment 3 Enji Cooper freebsd_committer freebsd_triage 2017-02-07 18:43:30 UTC
(In reply to commit-hook from comment #2)

Ok -- bandaid applied to stop the test failures. Working on a better fix.
Comment 4 Enji Cooper freebsd_committer freebsd_triage 2017-06-12 14:30:35 UTC
This is now affecting ^/stable/11. From
https://ci.freebsd.org/job/FreeBSD-stable-11-amd64-test/1432/testReport/usr.bin.yacc/yacc_tests/main/
:

...diff ./yacc/expr.oxout.tab.c
--- ./yacc/expr.oxout.tab.c	2017-06-11 11:08:18.866022000 +0000
+++ ./yacc/test-expr.oxout.tab.c	2017-06-11 11:08:19.966978000 +0000
@@ -178,7 +178,7 @@
 #define ID 257
 #define CONST 258
 #define YYERRCODE 256
-typedef short YYINT;
+typedef int YYINT;
 static const YYINT expr.oxout_lhs[] = {                  -1,
     2,    0,    1,    3,    3,    3,    3,    3,    3,    3,
 };
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-06-12 17:38:09 UTC
A commit references this bug:

Author: ngie
Date: Mon Jun 12 17:37:18 UTC 2017
New revision: 319860
URL: https://svnweb.freebsd.org/changeset/base/319860

Log:
  MFC r313398:

  Approved by:	re (gjb)

  Apply r274475's to expr.oxout.tab.c to fix the test on FreeBSD

  YYINT on FreeBSD is int, not short

  I'll work with the upstream maintainer or come up with a build
  method of modifying their definitions on install instead of
  having to modify tests to match our forked YYINT definition.

  PR:		216891

Changes:
_U  stable/11/
  stable/11/contrib/byacc/test/yacc/expr.oxout.tab.c
Comment 6 Enji Cooper freebsd_committer freebsd_triage 2017-07-24 16:42:03 UTC
byacc is a few versions behind on ^/stable/10. I don't see the merits of backporting the latest version to 10-STABLE, so I'll close this bug.