[lld] 721e8f3 - [ELF] Improve unknown -z test

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 10:26:21 PDT 2024


Author: Fangrui Song
Date: 2024-03-20T10:26:15-07:00
New Revision: 721e8f366f8665468f69dd8e29f97c6da1614a8f

URL: https://github.com/llvm/llvm-project/commit/721e8f366f8665468f69dd8e29f97c6da1614a8f
DIFF: https://github.com/llvm/llvm-project/commit/721e8f366f8665468f69dd8e29f97c6da1614a8f.diff

LOG: [ELF] Improve unknown -z test

Added: 
    

Modified: 
    lld/test/ELF/driver.test

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/driver.test b/lld/test/ELF/driver.test
index 260be8e8f883bb..b8f4584a3267a3 100644
--- a/lld/test/ELF/driver.test
+++ b/lld/test/ELF/driver.test
@@ -53,12 +53,13 @@
 # RUN: not ld.lld %t -output=/no/such/file 2>&1 | FileCheck -check-prefix=ERR9 %s
 # ERR9: cannot open output file utput=/no/such/file
 
-# RUN: ld.lld %t -z foo -o /dev/null 2>&1 | FileCheck -check-prefix=ERR10 %s
-# RUN: ld.lld %t -z foo -o /dev/null --version 2>&1 | FileCheck -check-prefix=ERR10 %s
+# RUN: ld.lld %t -z foo -o /dev/null 2>&1 | FileCheck -check-prefix=ERR10 %s --implicit-check-not=warning:
+# RUN: ld.lld %t -z foo -z rel -z rela -z max-page-size=1 -z common-page-size=1 -o /dev/null --version 2>&1 | \
+# RUN:   FileCheck -check-prefix=ERR10 %s --implicit-check-not=warning:
 # ERR10: warning: unknown -z value: foo
 
 ## Check we report "unknown -z value" error even with -v.
-# RUN: ld.lld %t -z foo -o /dev/null -v 2>&1 | FileCheck -check-prefix=ERR10 %s
+# RUN: ld.lld %t -z foo -z rel -o /dev/null -v 2>&1 | FileCheck -check-prefix=ERR10 %s --implicit-check-not=warning:
 
 ## Note: in GNU ld, --fatal-warning still leads to a warning.
 # RUN: not ld.lld %t -z foo --fatal-warnings 2>&1 | FileCheck --check-prefix=ERR10-FATAL %s


        


More information about the llvm-commits mailing list