[lld] 4e2d5fc - [lld/mac] add test coverage for -sectcreate and -order_file with --reproduce
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 01:42:10 PDT 2021
Hi Nico,
Is it absolutely necessary to use DOS/EICAR_Test_File as the contents of your testfile sectdata.txt file? In our internal Windows build machine, Windows Defender is detecting that file as a virus when it is accessed and intercepts it and deletes the file causing the test to fail. Is there another way to test this without using a file that is considered a virus?
Windows Defender output:
=====
Category: Virus
Description: This program is dangerous and replicates by infecting other files.
Recommended action: Remove this software immediately.
Items:
file:C:\<path_to_file>\sectdata.txt
Get more information about this item online.
=====
The link for more information it refers to is https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?name=Virus%3aDOS%2fEICAR_Test_File&threatid=2147519003&enterprise=0
Douglas Yung
-----Original Message-----
From: llvm-commits <llvm-commits-bounces at lists.llvm.org> On Behalf Of Nico Weber via llvm-commits
Sent: Saturday, April 24, 2021 5:02
To: llvm-commits at lists.llvm.org
Subject: [lld] 4e2d5fc - [lld/mac] add test coverage for -sectcreate and -order_file with --reproduce
Author: Nico Weber
Date: 2021-04-24T08:00:49-04:00
New Revision: 4e2d5fcf71d2995c98184293f8925731a6b0f30d
URL: https://github.com/llvm/llvm-project/commit/4e2d5fcf71d2995c98184293f8925731a6b0f30d
DIFF: https://github.com/llvm/llvm-project/commit/4e2d5fcf71d2995c98184293f8925731a6b0f30d.diff
LOG: [lld/mac] add test coverage for -sectcreate and -order_file with --reproduce
Would've caught the (since fixed) regression in D97610.
No behavior change.
Differential Revision: https://reviews.llvm.org/D101218
Added:
Modified:
lld/test/MachO/reproduce.s
Removed:
################################################################################
diff --git a/lld/test/MachO/reproduce.s b/lld/test/MachO/reproduce.s index f618277ac838..b3460b5cd361 100644
--- a/lld/test/MachO/reproduce.s
+++ b/lld/test/MachO/reproduce.s
@@ -4,22 +4,32 @@
# RUN: mkdir -p %t.dir/build1
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t.dir/build1/foo.o # RUN: echo '_main' > %t.dir/main.exports
+# RUN: echo '_main' > %t.dir/main.order # RUN: echo
+'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
+> %t.dir/sectdata.txt
# RUN: cd %t.dir
# RUN: %lld -platform_version macos 10.10.0 11.0 \
# RUN: -exported_symbols_list main.exports \
+# RUN: -order_file main.order \
+# RUN: -sectcreate __COMPLETELY __legit sectdata.txt \
# RUN: build1/foo.o -o bar --reproduce repro1.tar
# RUN: tar tf repro1.tar | FileCheck -DPATH='%:t.dir' --check-prefix=LIST %s # LIST: repro1/response.txt # LIST: [[PATH]]/main.exports # LIST: [[PATH]]/build1/foo.o
+# LIST: [[PATH]]/main.order
+# LIST: [[PATH]]/sectdata.txt
# RUN: tar xf repro1.tar
# RUN: cmp build1/foo.o repro1/%:t.dir/build1/foo.o # RUN:
diff main.exports repro1/%:t.dir/main.exports
+# RUN:
diff main.order repro1/%:t.dir/main.order
+# RUN:
diff sectdata.txt repro1/%:t.dir/sectdata.txt # RUN: FileCheck %s --check-prefix=RSP1 < repro1/response.txt
# RSP1: {{^}}-platform_version macos 10.10.0 11.0{{$}}
# RSP1-NEXT: -exported_symbols_list [[BASEDIR:.+]]/main.exports
+# RSP1-NEXT: -order_file [[BASEDIR]]/main.order # RSP1-NEXT:
+-sectcreate __COMPLETELY __legit [[BASEDIR]]/sectdata.txt
# RSP1-NOT: {{^}}repro1{{[/\\]}}
# RSP1-NEXT: [[BASEDIR]]/build1/foo.o
# RSP1-NEXT: -o bar
_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list