[PATCH] D63094: [compiler-rt] Fix name_to_handle_at.cc test on Overlay2

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 13:41:19 PDT 2019


amyk created this revision.
amyk added a reviewer: eugenis.
Herald added subscribers: llvm-commits, Sanitizers, jsji, dberris, kubamracek.
Herald added projects: LLVM, Sanitizers.

This patch aims to fix the test case, `name_to_handle_at.cc` that fails on Docker.

Overlay2 on Docker does not support the current check for the ``name_to_handle_at()` function call`of the test case. 
Thus, the proposed fix is to check for `/dev/null` in the test instead, as this check is supported. 
Checking for `/dev/null` has been utilized in the past for other test cases, as well.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D63094

Files:
  compiler-rt/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc


Index: compiler-rt/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
===================================================================
--- compiler-rt/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
+++ compiler-rt/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
@@ -13,7 +13,7 @@
       malloc(sizeof(*handle) + MAX_HANDLE_SZ));
 
   handle->handle_bytes = MAX_HANDLE_SZ;
-  int res = name_to_handle_at(AT_FDCWD, argv[0], handle, &mount_id, 0);
+  int res = name_to_handle_at(AT_FDCWD, "/dev/null", handle, &mount_id, 0);
   assert(!res);
 
   free(handle);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63094.203888.patch
Type: text/x-patch
Size: 592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190610/c1b32ca5/attachment.bin>


More information about the llvm-commits mailing list