Page MenuHomeFreeBSD

tools/test: add a program to check INT $0x80 behavior on amd64
ClosedPublic

Authored by kib on Mon, Apr 27, 4:26 AM.
Tags
None
Referenced Files
F154763975: D56654.id176609.diff
Wed, Apr 29, 9:43 AM
F154643188: D56654.diff
Wed, Apr 29, 3:10 AM
F154552269: D56654.diff
Tue, Apr 28, 9:41 PM
F154518732: D56654.id176688.diff
Tue, Apr 28, 7:47 PM
F154517363: D56654.diff
Tue, Apr 28, 7:38 PM
Unknown Object (File)
Tue, Apr 28, 9:24 AM
Unknown Object (File)
Tue, Apr 28, 9:24 AM
Unknown Object (File)
Tue, Apr 28, 9:24 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Mon, Apr 27, 4:26 AM

You could add it to tests/sys/arch/amd64 using PLAIN_TESTS_C, and it will run automatically. The test should just exit with a non-zero status if we do not get SIGBUS at the expected location.

Move to tests/sys/arch.

There is something wrong/missing with the Makefile or the program itself:

root@r-freeb44:~ # kyua test -k /usr/tests/sys/arch/Kyuafile
amd64/int0x80:__test_cases_list__  ->  broken: Invalid header for test case list; expecting Content-Type for application/X-atf-tp version 1, got 'int $0x80 raises SIGBUS'  [0.000s]

Results file id is usr_tests_sys_arch.20260428-014145-017595
Results saved to /root/.kyua/store/results.usr_tests_sys_arch.20260428-014145-017595.db

0/1 passed (1 broken, 0 failed, 0 skipped)

BTW does the addition requires patching etc/mtree/BSD.tests.dist? I do not see aarch subdir there.

tests/sys/arch/amd64/Makefile
4

A "plain" test is just a standalone C program which exits with status 0 if the test(s) pass, and non-zero otherwise.

markj added a subscriber: andrew.

Thank you.

In D56654#1298293, @kib wrote:

BTW does the addition requires patching etc/mtree/BSD.tests.dist? I do not see aarch subdir there.

Yes, I think so. I thought @andrew set it up so that this would not be necessary, but apparently not.

This revision is now accepted and ready to land.Wed, Apr 29, 3:16 AM