[compiler-rt] 40a073e - [sanitizer] Fix protoent without network
    Vitaly Buka via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jul 17 02:21:40 PDT 2020
    
    
  
Author: Vitaly Buka
Date: 2020-07-17T02:21:18-07:00
New Revision: 40a073eac1bb18fec5e283e4488eac05ab6e629a
URL: https://github.com/llvm/llvm-project/commit/40a073eac1bb18fec5e283e4488eac05ab6e629a
DIFF: https://github.com/llvm/llvm-project/commit/40a073eac1bb18fec5e283e4488eac05ab6e629a.diff
LOG: [sanitizer] Fix protoent without network
Added: 
    
Modified: 
    compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp
Removed: 
    
################################################################################
diff  --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/protoent.cpp
index a1a93badf6b8..a10fd114022c 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 <assert.h>
@@ -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;
        
    
    
More information about the llvm-commits
mailing list