Commit a41e4696 authored by Steve Beattie's avatar Steve Beattie

Subject: libapparmor - c tests, only print epoch and audit subid if identified

The test program didn't make use of the existing print_long() macro for
printing long values, which meant that they were always emitted for
every testcase. This patch makes them consistent with all the other
emitted fields and fixes up the expected output where they shouldn't be
emitted.
Signed-off-by: Steve Beattie's avatarSteve Beattie <steve@nxnw.org>
Acked-by: Tyler Hicks's avatarTyler Hicks <tyhicks@canonical.com>
parent 994d1ddb
......@@ -218,7 +218,7 @@ int print_results(aa_log_record *record)
print_string("DBus interface", record->dbus_interface);
print_string("DBus member", record->dbus_member);
printf("Epoch: %lu\n", record->epoch);
printf("Audit subid: %u\n", record->audit_sub_id);
print_long("Epoch", record->epoch, 0);
print_long("Audit subid", (long) record->audit_sub_id, 0);
return(0);
}
START
File: test_multi/avc_audit_invalid_audit_id.in
Event type: AA_RECORD_INVALID
Epoch: 0
Audit subid: 0
START
File: test_multi/syslog_other_01.in
Event type: AA_RECORD_INVALID
Epoch: 0
Audit subid: 0
START
File: test_multi/syslog_other_02.in
Event type: AA_RECORD_INVALID
Epoch: 0
Audit subid: 0
START
File: test_multi/syslog_other_03.in
Event type: AA_RECORD_INVALID
Epoch: 0
Audit subid: 0
START
File: test_multi/syslog_other_04.in
Event type: AA_RECORD_INVALID
Epoch: 0
Audit subid: 0
......@@ -11,5 +11,3 @@ DBus bus: session
DBus path: /org/freedesktop/DBus
DBus interface: org.freedesktop.DBus
DBus member: Hello
Epoch: 0
Audit subid: 0
......@@ -7,5 +7,3 @@ Profile: /tmp/apparmor-2.8.0/tests/regression/apparmor/dbus_service
Name: com.apparmor.Test
PID: 2940
DBus bus: session
Epoch: 0
Audit subid: 0
......@@ -12,5 +12,3 @@ DBus bus: session
DBus path: /com/apparmor/Test
DBus interface: com.apparmor.Test
DBus member: Signal
Epoch: 0
Audit subid: 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment