Bug 242095

Summary: failing test case: usr.bin.unifdef.basic_test.basic
Product: Base System Reporter: Li-Wen Hsu <lwhsu>
Component: testsAssignee: Conrad Meyer <cem>
Status: Closed FIXED    
Severity: Affects Only Me CC: cem, zeising
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Li-Wen Hsu freebsd_committer freebsd_triage 2019-11-20 05:24:08 UTC
r354843 or r354847 might introduce regression to unifdef(1):

The output of:
`unifdef -U__FreeBSD__ /usr/tests/usr.bin/unifdef/d_basic.in`
doesn't match /usr/tests/usr.bin/unifdef/d_basic.out

Revert to r326276 and the test passes again.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-11-20 05:30:36 UTC
A commit references this bug:

Author: lwhsu
Date: Wed Nov 20 05:30:31 UTC 2019
New revision: 354877
URL: https://svnweb.freebsd.org/changeset/base/354877

Log:
  Temporarily skip the failing test case usr.bin.unifdef.basic_test.basic

  PR:		242095
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/contrib/netbsd-tests/usr.bin/unifdef/t_basic.sh
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-11-20 05:34:37 UTC
A commit references this bug:

Author: lwhsu
Date: Wed Nov 20 05:34:02 UTC 2019
New revision: 354878
URL: https://svnweb.freebsd.org/changeset/base/354878

Log:
  Only skip failing test case in CI.

  PR:		242095
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/contrib/netbsd-tests/usr.bin/unifdef/t_basic.sh
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2019-11-20 15:55:43 UTC
From zeising:

usr.sbin/amd/libamu is using unifdef to build, perhaps we should add it to bootstrap stuff. People who have installed it during the breakage will have some trouble.
Comment 4 Conrad Meyer freebsd_committer freebsd_triage 2019-11-20 16:28:07 UTC
I’ll take a look. When I ran the tests, that one passed. Thanks for the report.
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-11-20 19:07:54 UTC
A commit references this bug:

Author: cem
Date: Wed Nov 20 19:07:22 UTC 2019
New revision: 354911
URL: https://svnweb.freebsd.org/changeset/base/354911

Log:
  Revert r354847 for now

  It was broken.

  PR:		242095
  Reported by:	lwhsu

Changes:
  head/usr.bin/unifdef/unifdef.c
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-11-20 19:43:57 UTC
A commit references this bug:

Author: cem
Date: Wed Nov 20 19:43:35 UTC 2019
New revision: 354912
URL: https://svnweb.freebsd.org/changeset/base/354912

Log:
  Re-apply fixed r354847

  unifdef(1): Improve worst-case bound on symbol resolution

  Use RB_TREE to make some algorithms O(lg N) and O(N lg N) instead of O(N)
  and O(N^2).

  While here, remove arbitrarily limit on number of macros understood.

  Reverts r354877 and r354878, which disabled the (correct) test.

  PR:		242095
  Reported by:	lwhsu

Changes:
  head/contrib/netbsd-tests/usr.bin/unifdef/t_basic.sh
  head/usr.bin/unifdef/unifdef.c
Comment 7 Conrad Meyer freebsd_committer freebsd_triage 2019-11-20 19:44:49 UTC
Please don't set MFC flags on this.