From: Vitaly Buka Date: Fri, 17 Jul 2020 08:23:27 +0000 (-0700) Subject: [sanitizer] Fix protoent without network X-Git-Tag: llvmorg-13-init~17631 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40a073eac1bb18fec5e283e4488eac05ab6e629a;p=platform%2Fupstream%2Fllvm.git [sanitizer] Fix protoent without network --- diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp index a1a93ba..a10fd11 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp +++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp @@ -1,4 +1,6 @@ -// RUN: %clangxx -std=c++11 -O0 -g %s -o %t && %run %t 2>&1 | FileCheck %s +// RUN: %clangxx -std=c++11 -O0 -g %s -o %t +// RUN: %clangxx -fno-sanitize=all -std=c++11 -O0 -g %s -o %t.nosan +// RUN: diff <(%run %t 2>&1) <(%run %t.nosan 2>&1) // REQUIRES: !android #include @@ -46,23 +48,12 @@ void print_protoent_by_num(int num) { } int main() { - // CHECK: All protoent - // CHECK: ip (0) - // CHECK-NEXT: alias IP - // CHECK: ipv6 (41) - // CHECK-NEXT: alias IPv6 fprintf(stderr, "All protoent\n"); print_all_protoent(); - // CHECK: Protoent by name - // CHECK-NEXT: ipv6 (41) - // CHECK-NEXT: alias IPv6 fprintf(stderr, "Protoent by name\n"); print_protoent_by_name("ipv6"); - // CHECK: Protoent by num - // CHECK-NEXT: udp (17) - // CHECK-NEXT: alias UDP fprintf(stderr, "Protoent by num\n"); print_protoent_by_num(17); return 0;