[compiler-rt] 5d3a995 - Port ubsan nullability.c test to Windows

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 11:24:10 PST 2020


For the lit shell issues, yes, you can see them on non-Windows by setting
LIT_USE_INTERNAL_SHELL=1 in the environment. There was some desire in the
past to standardize on the lit internal shell so that everyone sees the
same failures, but I think more uses of advanced shell features have been
added to test suites that don't run on Windows (tsan, msan). That makes it
harder to motivate the migration. You can also search for REQUIRES: shell
to find some.

For the quoting and path issues, I don't have a great solution other than
running tests on Windows. This failure was particularly hard to detect
because it has to do with the colon character, which separates flags in
*SAN_OPTIONS environment variables. Do the pre-merge checks run tests on
Windows yet? I know that is a goal, but I don't know the status of it.
GMail is telling me that Christian Kuhnel is OOO.

As far as uploading to phab to trigger test runs goes, I think it auto-ccs
llvm-commits and triggers herald rules, which could be noisy. I think in
the long run we might be able to trigger test runs from branches uploaded
to personal github repos cloned from llvm-project. For now I don't see a
good way to catch these kinds of portability issues pre-commit, so we'll
just live with it. =/

On Wed, Mar 4, 2020 at 10:42 AM Vedant Kumar <vedant_kumar at apple.com> wrote:

> I'm sorry about the breakage.
>
> Is there a mode I can enable when testing with lit to suss out this type
> of failure pre-commit? Or, if I should just create a Phab review each time
> and let the pre-merge checks catch issues, that would be fine too.
>
> vedant
>
> > On Mar 3, 2020, at 1:19 PM, Reid Kleckner via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> >
> > Author: Reid Kleckner
> > Date: 2020-03-03T13:18:58-08:00
> > New Revision: 5d3a9959382762f84318b52f6ba6532cb8b5c807
> >
> > URL:
> https://github.com/llvm/llvm-project/commit/5d3a9959382762f84318b52f6ba6532cb8b5c807
> > DIFF:
> https://github.com/llvm/llvm-project/commit/5d3a9959382762f84318b52f6ba6532cb8b5c807.diff
> >
> > LOG: Port ubsan nullability.c test to Windows
> >
> > Two issues:
> > - Need to add env prefix to be compatible with the lit internal shell
> > - Need to quote the colon in Windows paths with '"%t.supp"'
> >
> > Added:
> >
> >
> > Modified:
> >    compiler-rt/test/ubsan/TestCases/Misc/nullability.c
> >
> > Removed:
> >
> >
> >
> >
> ################################################################################
> > diff  --git a/compiler-rt/test/ubsan/TestCases/Misc/nullability.c
> b/compiler-rt/test/ubsan/TestCases/Misc/nullability.c
> > index 50295fe503f9..a68d0f8ea362 100644
> > --- a/compiler-rt/test/ubsan/TestCases/Misc/nullability.c
> > +++ b/compiler-rt/test/ubsan/TestCases/Misc/nullability.c
> > @@ -6,7 +6,7 @@
> > // RUN: echo "nullability-arg:nullability.c" > %t.supp
> > // RUN: echo "nullability-return:nullability.c" >> %t.supp
> > // RUN: echo "nullability-assign:nullability.c" >> %t.supp
> > -// RUN: UBSAN_OPTIONS=suppressions=%t.supp %run %t 2>&1 | FileCheck
> -allow-empty -check-prefix=SUPPRESS %s
> > +// RUN: env UBSAN_OPTIONS=suppressions='"%t.supp"' %run %t 2>&1 |
> FileCheck -allow-empty -check-prefix=SUPPRESS %s
> > // SUPPRESS-NOT: runtime error
> >
> > // CHECK: nullability.c:[[@LINE+2]]:41: runtime error: null pointer
> returned from function declared to never return null
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200304/fe99ddbd/attachment.html>


More information about the llvm-commits mailing list