Page MenuHomeFreeBSD

usr.sbin/praudit: fix tests after 5619d49e07
ClosedPublic

Authored by arichardson on Feb 2 2021, 3:21 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 12:44 AM
Unknown Object (File)
Mar 12 2024, 1:35 AM
Unknown Object (File)
Mar 12 2024, 1:34 AM
Unknown Object (File)
Mar 8 2024, 10:37 PM
Unknown Object (File)
Mar 8 2024, 4:28 AM
Unknown Object (File)
Mar 8 2024, 4:16 AM
Unknown Object (File)
Feb 10 2024, 6:33 PM
Unknown Object (File)
Jan 17 2024, 3:08 PM
Subscribers

Details

Summary

Commit 5619d49e07 made the getgrgid() call inside bsm work as
intended so we now print "wheel" instead of a numeric 0 in the rgid field.

Test Plan

Before: 2/10 passed (8 failed)
After: 10/10 passed (0 failed)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 36677
Build 33566: arc lint + arc unit

Event Timeline

The old tests still pass on my system (built Jan-9-2021). Can you figure out what's different about yours?

The old tests still pass on my system (built Jan-9-2021). Can you figure out what's different about yours?

I built d21ce74dcce6f8b69451b3b2dd291d35cbb70609 with D28451. The tests are failing on RISC-V/AArch64/Amd64 and I can't see any obvious commits since 9th Jan.

The old tests still pass on my system (built Jan-9-2021). Can you figure out what's different about yours?

I built d21ce74dcce6f8b69451b3b2dd291d35cbb70609 with D28451. The tests are failing on RISC-V/AArch64/Amd64 and I can't see any obvious commits since 9th Jan.

Yes, it fails for me too, now that I've updated. From the source code of openbsm, it looks like getgrgid wasn't working before, and is now. The change might be related to the recently fixed https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252094 or https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165527 ?

arichardson retitled this revision from usr.sbin/praudit: fix tests to usr.sbin/praudit: fix tests after 5619d49e07.Feb 3 2021, 9:50 AM
arichardson edited the summary of this revision. (Show Details)
arichardson edited the test plan for this revision. (Show Details)
arichardson added a reviewer: markj.

I just ran the tests with 5619d49e07d3942e438f3d06269f3c1c466cf5b7 built and they fail, whereas with commit 7abc10098b3d9c23d611294714b3058e8048aec0 (the one before) they still print the numeric 0.

Thanks for fixing this and sorry for the breakage. I had run a subset of the test suite but clearly should have run the whole thing.

The problem seems to be that praudit() expects setgroupent(1) to work since it runs in capability mode and can't open the group database after initialization. 48a186863431ec7a23c6174bc376cafa59dd5fbf fixes that. I suspect running the tests with kern.trap_enotcap=1 would cause them to crash before the fix.

This revision is now accepted and ready to land.Feb 3 2021, 1:53 PM