Page MenuHomeFreeBSD

m4: Convert tests to ATF
ClosedPublic

Authored by des on Feb 4 2026, 8:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 4, 6:25 AM
Unknown Object (File)
Mon, Jun 1, 4:09 AM
Unknown Object (File)
Mon, Jun 1, 1:52 AM
Unknown Object (File)
Sun, May 31, 8:27 PM
Unknown Object (File)
Sat, May 30, 8:40 AM
Unknown Object (File)
Tue, May 26, 9:08 AM
Unknown Object (File)
Mon, May 25, 9:17 PM
Unknown Object (File)
Sun, May 24, 5:16 PM
Subscribers

Details

Summary

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70428
Build 67311: arc lint + arc unit

Event Timeline

des requested review of this revision.Feb 4 2026, 8:53 PM

kind of dirty, but ig you could have another function for generating these testcases using eval:

define_test()
{
	name=$1
	shift
	args=$*

	eval "
${name}_head()
{
}
${name}_body()
{
	m4_test ${args} ${name}
}
"
}

# [...]

define_test eval
define_test ff_after_dnl
define_test gnueval -g
define_test gnuformat -g

# [...]
usr.bin/m4/tests/m4_test.sh
71

presumably?

kind of dirty, but ig you could have another function for generating these testcases using eval:

I did that for sbin/md5 and regretted it.

des marked an inline comment as done.Feb 5 2026, 1:49 PM

It looks fine to me...

This revision is now accepted and ready to land.Feb 7 2026, 6:07 PM
This revision was automatically updated to reflect the committed changes.