-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Smoke tests for ASan. #879
Conversation
!psdb |
4ccbace
to
d4a4b8d
Compare
I am going to push the same changes into branch aomp-epsdb. |
Since these asan tests are supposed to fail at runtime, you need to check the pipestatus to filecheck for the return code. |
The changes you made to Makefile.defs causes changes to at least all smoke tests which now fail. Example is test/smoke/veccopy /work/grodgers/rocm/aomp/bin/clang -O2 -fopenmp --offload-arch=gfx906 -D__OFFLOAD_ARCH_gfx906__ veccopy.c -o veccopy After your change, I get this with "make run" |
Regarding your changes to Makefile.defs, I believe you want to say ifneq ($(AOMP_SANITIZER).)
Then change the setting ofr RUNENV in the block of code about line 336 ish to this.
There may be one other change to prevent invalid tests with AOMP_SANITIZER is on since it will only work for HSA_XNACK on. |
d4a4b8d
to
0bfafd6
Compare
Thanks @gregrodgers. Actually previously the environment variable AOMP_SANITIZER(Created for testing smoke/smoke-asan tests with AOMP-ASan pipeline) was set with value of AOMP_BUILD_SANITIZER. However, few months back we had by default in aomp_common_vars AOMP_BUILD_SANITIZER=1. So, this dependency was causing by default the AOMP_SANITIZER=1. The current revision of the patch has removed this kind of dependency. To enable AOMP-ASan testing for smoke/smoke-asan now the users would have to explicitly set AOMP_SANITIZER=1 which executing check_smoke_asan.sh script. example: $$ AOMP_SANITIZER=1 ./check_smoke_asan.sh |
Hi @gregrodgers, actually I had the patch in gerrit(1030763) for amd-staging for clang-driver & for legacy-flang driver(ROCm/flang#81) both will add the rpath by default when any application is compiled with sanitizer flags. This, I actually discussed with @estewart08 since AOMP is going for rpath by default for openmp so support rpath for host-asan(libclang_rt.asan.x86_64.so) library and for openmp-asan instrumented libraries. I believe we don't need this setting.
Don't think we need this setting also because clang-driver and flang-legacy driver would handle for asan runtime library dependencies. |
Thanks @estewart08. The current revision had the required changes. |
a4c090b
to
875f87d
Compare
aa81fc3
to
b9f35e1
Compare
Hi @saipoorna, I think this PR to merge on branch aomp-dev is enough for smoke testing of ASan. I don't require to open a duplicate PR for aomp-epsdb. I checked downstream, the npsdb CI utilizes the aomp-dev branch for aomp smoke testing. |
Here is the output of AOMP_SANITIZER=1 ./check_smoke_asan.sh.
|
54e7616
to
364193d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I did have some comments on other asan related aomp patches though. This should be ok to land as it is isolated to the tests rather than the build.
f396b35
to
22bee50
Compare
Hi Ethan, I don't have anything more on this PR to be added, unless I write more tests. Can you please review again this PR.? Thanks & Regards |
1. Add a new makefile target 'check-asan'. 'check-asan' is capable of getting both the filecheck_status and test_status. 2. Remove dependency of AOMP_SANITIZER on AOMP_BUILD_SANITIZER. 3. Utilize the AOMP_SANITIZER environtment variable in check_smoke.sh to enable check-asan target for both parallel and sequential builds.
1. Add comments related to documentation for check-asan target. 2. Ensure that check-asan target should only be executed for smoke-asan tests.
2eb6965
to
4664675
Compare
Usage: ./run_rocm_test.sh -a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, asan enabled testing will be enabled with run_rocm_test.sh -a
Thanks. Merging this PR now. |
No description provided.