When using a static libunwind, the check_memcpy.c can fail because it checks that tsan intercepted all memcpy/memmoves in the final binary. Though if the static libunwind is not instrumented, then this will fail because it may contain regular memcpy/memmoves.
This adds a new REQUIRES check for ensuring that this test won't run unless a dynamic libunwind.so is provided.
That variable doesn't seem to be used anywhere else so you can just inline it.