[compiler-rt] r363167 - [compiler-rt] Fix name_to_handle_at.cc test on Overlay2 (for Docker)

Amy Kwan via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 07:19:25 PDT 2019


Author: amyk
Date: Wed Jun 12 07:19:24 2019
New Revision: 363167

URL: http://llvm.org/viewvc/llvm-project?rev=363167&view=rev
Log:
[compiler-rt] Fix name_to_handle_at.cc test on Overlay2 (for Docker)

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. 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.

Differential Revision: https://reviews.llvm.org/D63094

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

Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc?rev=363167&r1=363166&r2=363167&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/name_to_handle_at.cc Wed Jun 12 07:19:24 2019
@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
       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);




More information about the llvm-commits mailing list