test_clang: initialize format string arg on stack
With local LLVM (4.0ish), inline strings in this test case would
segfault. Fix the crash by constructing explicitly on the stack.
@@ -471,7 +471,8 @@ int trace_entry(struct pt_regs *ctx) {
text = """
#include <uapi/linux/ptrace.h>
int trace_entry(struct pt_regs *ctx) {
- bpf_trace_printk("%s %s\\n", "hello", "world");
+ char s1[] = "hello", s2[] = "world";
+ bpf_trace_printk("%s %s\\n", s1, s2);
return 0;
}
"""
