From 324eac771819e974fb1f4595659212584689adc7 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Wed, 21 Jun 2023 14:38:28 +0200 Subject: [PATCH] C#: Base the Concurrency query test cases on stubs. --- .../ql/test/query-tests/Concurrency/FutileSyncOnField/options | 2 ++ csharp/ql/test/query-tests/Concurrency/LockOrder/options | 3 ++- csharp/ql/test/query-tests/Concurrency/LockThis/options | 2 ++ csharp/ql/test/query-tests/Concurrency/LockedWait/options | 2 ++ .../ql/test/query-tests/Concurrency/SynchSetUnsynchGet/options | 2 ++ .../query-tests/Concurrency/UnsafeLazyInitialization/options | 3 ++- .../query-tests/Concurrency/UnsynchronizedStaticAccess/options | 3 ++- 7 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 csharp/ql/test/query-tests/Concurrency/FutileSyncOnField/options create mode 100644 csharp/ql/test/query-tests/Concurrency/LockThis/options create mode 100644 csharp/ql/test/query-tests/Concurrency/LockedWait/options create mode 100644 csharp/ql/test/query-tests/Concurrency/SynchSetUnsynchGet/options diff --git a/csharp/ql/test/query-tests/Concurrency/FutileSyncOnField/options b/csharp/ql/test/query-tests/Concurrency/FutileSyncOnField/options new file mode 100644 index 00000000000..75c39b4541b --- /dev/null +++ b/csharp/ql/test/query-tests/Concurrency/FutileSyncOnField/options @@ -0,0 +1,2 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/query-tests/Concurrency/LockOrder/options b/csharp/ql/test/query-tests/Concurrency/LockOrder/options index 28abf783565..75c39b4541b 100644 --- a/csharp/ql/test/query-tests/Concurrency/LockOrder/options +++ b/csharp/ql/test/query-tests/Concurrency/LockOrder/options @@ -1 +1,2 @@ -semmle-extractor-options: /r:System.Runtime.Extensions.dll /r:System.Threading.dll /r:System.Threading.Thread.dll +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/query-tests/Concurrency/LockThis/options b/csharp/ql/test/query-tests/Concurrency/LockThis/options new file mode 100644 index 00000000000..75c39b4541b --- /dev/null +++ b/csharp/ql/test/query-tests/Concurrency/LockThis/options @@ -0,0 +1,2 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/query-tests/Concurrency/LockedWait/options b/csharp/ql/test/query-tests/Concurrency/LockedWait/options new file mode 100644 index 00000000000..75c39b4541b --- /dev/null +++ b/csharp/ql/test/query-tests/Concurrency/LockedWait/options @@ -0,0 +1,2 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/query-tests/Concurrency/SynchSetUnsynchGet/options b/csharp/ql/test/query-tests/Concurrency/SynchSetUnsynchGet/options new file mode 100644 index 00000000000..75c39b4541b --- /dev/null +++ b/csharp/ql/test/query-tests/Concurrency/SynchSetUnsynchGet/options @@ -0,0 +1,2 @@ +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/query-tests/Concurrency/UnsafeLazyInitialization/options b/csharp/ql/test/query-tests/Concurrency/UnsafeLazyInitialization/options index 23a607518d8..75c39b4541b 100644 --- a/csharp/ql/test/query-tests/Concurrency/UnsafeLazyInitialization/options +++ b/csharp/ql/test/query-tests/Concurrency/UnsafeLazyInitialization/options @@ -1 +1,2 @@ -semmle-extractor-options: -langversion:latest +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj diff --git a/csharp/ql/test/query-tests/Concurrency/UnsynchronizedStaticAccess/options b/csharp/ql/test/query-tests/Concurrency/UnsynchronizedStaticAccess/options index be589a1b3db..75c39b4541b 100644 --- a/csharp/ql/test/query-tests/Concurrency/UnsynchronizedStaticAccess/options +++ b/csharp/ql/test/query-tests/Concurrency/UnsynchronizedStaticAccess/options @@ -1 +1,2 @@ -semmle-extractor-options: /r:System.Collections.Concurrent.dll /r:System.Threading.Thread.dll +semmle-extractor-options: /nostdlib /noconfig +semmle-extractor-options: --load-sources-from-project:${testdir}/../../../resources/stubs/_frameworks/Microsoft.NETCore.App/Microsoft.NETCore.App.csproj