feat(aa-log): add support change_profile & pivot_rule

This commit is contained in:
Alexandre Pujol 2023-11-27 19:21:43 +00:00
parent 52278490ab
commit d4bc07895a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
5 changed files with 105 additions and 7 deletions

View file

@ -34,6 +34,18 @@ func TestRule_FromLog(t *testing.T) {
log: mount1Log,
want: mount1,
},
{
name: "pivotroot",
fromLog: PivotRootFromLog,
log: pivotroot1Log,
want: pivotroot1,
},
{
name: "changeprofile",
fromLog: ChangeProfileFromLog,
log: changeprofile1Log,
want: changeprofile1,
},
{
name: "signal",
fromLog: SignalFromLog,
@ -141,6 +153,18 @@ func TestRule_Less(t *testing.T) {
other: mount2,
want: false,
},
{
name: "pivot_root1",
rule: pivotroot2,
other: pivotroot1,
want: true,
},
{
name: "pivot_root2",
rule: pivotroot1,
other: pivotroot3,
want: false,
},
{
name: "change_profile1",
rule: changeprofile1,
@ -273,6 +297,12 @@ func TestRule_Equals(t *testing.T) {
other: mount1,
want: true,
},
{
name: "pivot_root",
rule: pivotroot1,
other: pivotroot2,
want: false,
},
{
name: "change_profile",
rule: changeprofile1,