Page MenuHomeFreeBSD

tests: Allow building without TIOCSTI
AcceptedPublic

Authored by emaste on May 30 2025, 6:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 24, 2:46 PM
Unknown Object (File)
Sat, May 23, 4:10 PM
Unknown Object (File)
Thu, May 21, 8:52 PM
Unknown Object (File)
Sun, May 10, 6:21 AM
Unknown Object (File)
Tue, May 5, 7:50 AM
Unknown Object (File)
Mon, Apr 27, 4:23 PM
Unknown Object (File)
Apr 25 2026, 11:01 AM
Unknown Object (File)
Nov 13 2025, 2:13 PM
Subscribers

Details

Reviewers
kevans
markj
Group Reviewers
secteam
Summary

Posted for discussion. Some downstream projects (e.g. ElectroBSD) have removed the TIOCSTI #define and implementation; I'm curious what you think about #ifdefs like this to allow the test to build in this case.

Of course a downstream patch set could just include disconnecting the test, but this allows for a minimal change to remove TIOCSTI.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste created this revision.

I don't really understand--if we were to remove TIOCSTI, wouldn't that be done by removing the runtime implementation, rather than hiding the TIOCSTI symbol like this?

tests/sys/kern/tty/test_sti.c
329

In my tree I hid the sysctl to find consumers and confirm that the system works without it. The consumers are:

  • clang sanitizers
  • tcsh
  • mail
  • this test

mail and tcsh already have #ifndef TIOCSTI cases scattered throughout, presumably leftover from originally being portable (mail is not in /contrib though).

My thought was to allow downstream projects (e.g. ElectroBSD) maintain minimal diffs.

In my tree I hid the sysctl to find consumers and confirm that the system works without it. The consumers are:

You mean the TIOCSTI definition was hidden?

  • clang sanitizers
  • tcsh
  • mail
  • this test

mail and tcsh already have #ifndef TIOCSTI cases scattered throughout, presumably leftover from originally being portable (mail is not in /contrib though).

My thought was to allow downstream projects (e.g. ElectroBSD) maintain minimal diffs.

If I understand correctly, you're not proposing to actually remove the definition of TIOCSTI, just to make it easier to compile the base system against headers that do not define it.

This revision is now accepted and ready to land.Mon, May 25, 2:30 PM

You mean the TIOCSTI definition was hidden?

Sorry, yes. The ioctl definition.