test how much does fapolicyd affect a source RPM rebuild#23
test how much does fapolicyd affect a source RPM rebuild#23milosmalik wants to merge 1 commit intolinux-application-whitelisting:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new stress test designed to quantify the performance overhead of the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new stress test to measure the performance impact of fapolicyd on RPM builds. The test script has a critical issue where it fails to capture and report the performance data, which is its primary goal. There are also several opportunities for improvement in the script's robustness and maintainability, such as avoiding fragile file globbing, refactoring duplicated code into a function, and consolidating commands for better readability.
| rlRun "rpm -ivh ./fapolicyd-*" | ||
| rlRun -s "time rpmbuild -bb ~/rpmbuild/SPECS/fapolicyd.spec" | ||
| rlAssertNotGrep "Operation not permitted" $rlRun_LOG -i | ||
| rm -f $rlRun_LOG |
There was a problem hiding this comment.
The log file containing the time command's output is being deleted here without capturing the performance data. This makes the performance measurement aspect of the test ineffective, which is the primary goal of this test. The same issue is present on line 61. You should parse $rlRun_LOG to extract the build time before removing the file in both places, store the values, and then compare them at the end of the test to report on the performance impact. For example: TIME_WITH_FAPOLICYD=$(grep '^real' $rlRun_LOG | awk '{print $2}').
| rlRun "echo 'allow perm=any uid=root : dir=/root/rpmbuild' > /etc/fapolicyd/rules.d/22-buildroot.rules" | ||
| rlRun "echo 'allow perm=any uid=root trust=1 : all' >> /etc/fapolicyd/rules.d/22-buildroot.rules" |
There was a problem hiding this comment.
These two rlRun calls with echo can be combined into a single rlRun with a cat heredoc. This improves readability and is slightly more efficient as it invokes rlRun only once.
| rlRun "echo 'allow perm=any uid=root : dir=/root/rpmbuild' > /etc/fapolicyd/rules.d/22-buildroot.rules" | |
| rlRun "echo 'allow perm=any uid=root trust=1 : all' >> /etc/fapolicyd/rules.d/22-buildroot.rules" | |
| rlRun "cat <<EOF > /etc/fapolicyd/rules.d/22-buildroot.rules | |
| allow perm=any uid=root : dir=/root/rpmbuild | |
| allow perm=any uid=root trust=1 : all | |
| EOF" |
231b6bf to
0702f14
Compare
Recently reported customer cases revealed that a running fapolicyd service has a negative effect (slowdown) on SW building process. TBA later The TC cover RHEL-2611.
0702f14 to
b41a2b9
Compare
Recently reported customer cases revealed that a running fapolicyd service has a negative effect (slowdown) on SW building process.
TBA later
The TC cover RHEL-2611.