From c8ab0f0ad4053614acc0271016ae99665050883d Mon Sep 17 00:00:00 2001 From: Harmandeep Singh Date: Mon, 27 Apr 2020 22:57:01 +0530 Subject: [PATCH 1/3] improved coverage for varnish --- test/binaries/test-VARNISH-4.1.1.c | 11 +++++++++++ test/test_scanner.py | 15 +++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 test/binaries/test-VARNISH-4.1.1.c diff --git a/test/binaries/test-VARNISH-4.1.1.c b/test/binaries/test-VARNISH-4.1.1.c new file mode 100644 index 0000000000..46b61a6055 --- /dev/null +++ b/test/binaries/test-VARNISH-4.1.1.c @@ -0,0 +1,11 @@ +#include + +int main() { + printf("This program is designed to test the cve-bin-tool checker."); + printf("It outputs a few strings normally associated with varnish_4.1.1"); + printf("They appear below this line."); + printf("------------------"); + printf("varnish-4.1.1"); + + return 0; +} diff --git a/test/test_scanner.py b/test/test_scanner.py index 22a0a7f253..718dd2740a 100644 --- a/test/test_scanner.py +++ b/test/test_scanner.py @@ -1034,6 +1034,21 @@ def _file_test(self, url, filename, package, version): "CVE-2013-0345", ], ), + ( + "test-VARNISH-4.1.1.out", + "varnish", + "4.1.1", + [ + # Check for known cves in this version + "CVE-2017-12425", + "CVE-2017-8807", + ], + [ + # Check to make sure an older CVE isn't included + "CVE-2013-4484", + "CVE-2013-0345", + ], + ), ( "test-binutils-2.31.1.out", "binutils", From ea82c7e05ecee818a841c12d48941ceebd07b8c2 Mon Sep 17 00:00:00 2001 From: Harmandeep Singh Date: Tue, 28 Apr 2020 01:28:09 +0530 Subject: [PATCH 2/3] renamed file --- .../{test-VARNISH-4.1.1.c => test-var.nish-4.1.1_imprv_covrg.c} | 0 test/test_scanner.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename test/binaries/{test-VARNISH-4.1.1.c => test-var.nish-4.1.1_imprv_covrg.c} (100%) diff --git a/test/binaries/test-VARNISH-4.1.1.c b/test/binaries/test-var.nish-4.1.1_imprv_covrg.c similarity index 100% rename from test/binaries/test-VARNISH-4.1.1.c rename to test/binaries/test-var.nish-4.1.1_imprv_covrg.c diff --git a/test/test_scanner.py b/test/test_scanner.py index 1e25c60e41..82829897ae 100644 --- a/test/test_scanner.py +++ b/test/test_scanner.py @@ -1035,7 +1035,7 @@ def _file_test(self, url, filename, package, version): ], ), ( - "test-VARNISH-4.1.1.out", + "test-var.nish-4.1.1_imprv_covrg.c", "varnish", "4.1.1", [ From cae49975c374be5ea65df6bb92f33d722b699755 Mon Sep 17 00:00:00 2001 From: Harmandeep Singh Date: Tue, 28 Apr 2020 01:37:56 +0530 Subject: [PATCH 3/3] updated name --- test/test_scanner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_scanner.py b/test/test_scanner.py index 82829897ae..79614cd52d 100644 --- a/test/test_scanner.py +++ b/test/test_scanner.py @@ -1035,7 +1035,7 @@ def _file_test(self, url, filename, package, version): ], ), ( - "test-var.nish-4.1.1_imprv_covrg.c", + "test-var.nish-4.1.1_imprv_covrg.out", "varnish", "4.1.1", [