Skip to content

Conversation

@rprobaina
Copy link
Contributor

Issue: #5

Simple test case to test UID/GID event filtering.

This test case adds full coverage to the following auditsc.c functions, which are not exercised by any other test case of the test suite:

  • audit_field_compare()
  • audit_compare_gid()
  • audit_compare_uid()

Signed-off-by: Ricardo Robaina rrobaina@redhat.com

@pcmoore pcmoore changed the title tests/field_compare: add field_compare test RFE: add field_compare test Jun 24, 2025
@pcmoore
Copy link
Contributor

pcmoore commented Jun 24, 2025

I see the following error when running this PR:

Running as   user    root
        with context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
        on   system  Fedora

amcast_joinpart/test ................. ok   
backlog_wait_time_actual_reset/test .. ok   
bpf/test ............................. ok   
exec_execve/test ..................... ok   
exec_name/test ....................... ok     
fanotify/test ........................ ok   
field_compare/test ................... "my" variable @fields masks earlier declaration in same scope at field_compare/test line 76.
field_compare/test ................... ok     
file_create/test ..................... ok   
file_delete/test ..................... ok   
file_permission/test ................. ok   
file_rename/test ..................... ok   
filter_exclude/test .................. ok     
filter_exit/test ..................... ok   
filter_saddr_fam/test ................ ok   
filter_sessionid/test ................ ok   
io_uring/test ........................ ok   
login_tty/test ....................... ok   
lost_reset/test ...................... ok   
netfilter_pkt/test ................... ok     
signal/test .......................... ok   
syscalls_file/test ................... ok   
syscall_module/test .................. ok   
syscall_socketcall/test .............. ok   
time_change/test ..................... ok     
user_msg/test ........................ ok   
All tests successful.
Files=25, Tests=282, 39 wallclock secs ( 0.05 usr  0.04 sys +  9.12 cusr  1.41 csys = 10.62 CPU)
Result: PASS
make[1]: Leaving directory '/root/sources/audit-testsuite/tests'

Issue: linux-audit#5

Simple test case to test UID/GID event filtering.

This test case adds full coverage to the following
auditsc.c functions, which are not exercised by any
other test case of the test suite:
 - audit_field_compare()
 - audit_compare_gid()
 - audit_compare_uid()

Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
@rprobaina
Copy link
Contributor Author

Hi @pcmoore,

Thanks for reviewing this PR!

Good catch, I missed it. I've just pushed a V2 with that error fixed.

# TESTS="field_compare" make -e test
...
Running as   user    root
        with context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
        on   system  Fedora

field_compare/test .. ok     
All tests successful.
Files=1, Tests=50, 10 wallclock secs ( 0.02 usr  0.00 sys +  9.31 cusr  0.47 csys =  9.80 CPU)
Result: PASS
make[1]: Leaving directory '/home/rrobaina/src/audit/audit-testsuite/tests'

@pcmoore
Copy link
Contributor

pcmoore commented Aug 30, 2025

Merged via 25296c6, thanks!

@pcmoore pcmoore closed this Aug 30, 2025
@rprobaina
Copy link
Contributor Author

Thanks, Paul!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants