Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
apparmor-dbus
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tests
apparmor-dbus
Commits
3e56065a
Commit
3e56065a
authored
6 years ago
by
Martyn Welch
Browse files
Options
Downloads
Plain Diff
Merge commit '
061cc818
'
parents
10b4bcc1
061cc818
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
T4802: Fix up issues with apparmor-dbus testing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/run-aa-test
+7
-8
7 additions, 8 deletions
common/run-aa-test
with
7 additions
and
8 deletions
common/run-aa-test
+
7
−
8
View file @
3e56065a
...
...
@@ -54,7 +54,6 @@ if [ ! -x $1 ]; then
exit
1
fi
SOMETHING_FAILED
=
"False"
# typically "normal.expected" or "malicious.expected"
TEST_TITLE
=
$(
basename
${
EXPECT_FILE
}
)
...
...
@@ -78,7 +77,7 @@ if [ "${LAUNCH_DBUS}" = "True" ]; then
# Start a new D-Bus session for this test
CMD
=
"dbus-run-session --
$*
"
else
CMD
=
$*
CMD
=
"
$*
"
fi
CMDLINE
=
"common/run-test-in-systemd"
...
...
@@ -114,10 +113,11 @@ else
echo
"#
${
CMDLINE
}
exited
${
RET
}
"
# typically "normal.expected_underlying_tests: fail"
echo
"
${
TEST_TITLE
}
_underlying_tests: fail"
SOMETHING_FAILED
=
"True"
exit
1
fi
# Give
auditd
time to log the entries.
# Give
journal
time to log the entries.
sleep
3
# Get audit information from journal
...
...
@@ -143,6 +143,9 @@ done
PARSE_FILE
=
"
${
TMP_DIR
}
/PARSE"
# TODO: There is potential for other processes to cause messages to appear in
# the journal that may lead to false failures. If this is found to be an
# issue in practice, then additional filtering of results may be required
apparmor_parse_journal
${
AUDIT_FILE
}
DENIED
>
${
PARSE_FILE
}
echo
"#---8<--- actual parsed apparmor output from journal"
...
...
@@ -171,10 +174,6 @@ else
diff
-urN
${
TMP_DIR
}
/EXPECT
${
NUM
}
${
PARSE_FILE
}
echo
"#--->8---"
echo
"
${
TEST_TITLE
}
: fail"
SOMETHING_FAILED
=
"True"
fi
if
[
"
${
SOMETHING_FAILED
}
"
=
"True"
]
;
then
exit
1
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment