X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=t%2Ftests.t;h=3fbdb3efa1de73bba69fdd8f43bdf24e20f5179a;hp=0811ef7bd8643157f7bf90726371cec1e66bdf54;hb=49540cde704094918ad460f476ef65edb1a3d4f0;hpb=ae5da64f4f6f53ca3eb055d2124988847b2e8d50 diff --git a/t/tests.t b/t/tests.t index 0811ef7..3fbdb3e 100644 --- a/t/tests.t +++ b/t/tests.t @@ -1,6 +1,6 @@ # Tests for blhc. # -# Copyright (C) 2012 Simon Ruderich +# Copyright (C) 2012-2013 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 194; +use Test::More tests => 204; sub is_blhc { @@ -61,7 +61,7 @@ is_blhc '', '', 2, $usage; is_blhc '', '--version', 0, - 'blhc 0.03 Copyright (C) 2012 Simon Ruderich + 'blhc 0.03 Copyright (C) 2012-2013 Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -748,6 +748,22 @@ LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++-4.6 -Wl,-z,defs -o tes '; +# ada + +my $ada = 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc-4.6 -c -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security test.c +LDFLAGS missing (-Wl,-z,relro): /usr/bin/gcc-4.6 -shared -lgnat-4.6 -o libtest.so.2 test-a.o test-b.o test-c.o -Wl,--as-needed +CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security): gcc -c -g -O2 test.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -g -O2 test.c +CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security): gcc -g -O2 test.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 test.c +LDFLAGS missing (-Wl,-z,relro): gcc -g -O2 test.c +'; +is_blhc 'ada', '', 8, + $ada; +is_blhc 'ada-pbuilder', '', 8, + $ada; + + # libtool is_blhc 'libtool', '--bindnow', 8, @@ -814,6 +830,12 @@ LDFLAGS missing (-pie -Wl,-z,relro): gcc -fPIE -o test test.o '; +# architecture in older buildd logs + +is_blhc 'buildd-architecture-old', '', 0, + ''; + + # ignore architecture is_blhc ['arch-avr32', 'arch-i386', 'empty', 'arch-mipsel'], @@ -858,6 +880,8 @@ my $debian_hardening_wrapper = '; is_blhc 'debian-hardening-wrapper', '', 16, $debian_hardening_wrapper; +is_blhc 'debian-hardening-wrapper-pbuilder', '', 16, + $debian_hardening_wrapper; # false positives @@ -890,6 +914,9 @@ is_blhc 'buildd-dpkg-dev-missing', '--buildd', 0, is_blhc 'debian-hardening-wrapper', '--buildd', 0, 'I-hardening-wrapper-used|| '; +is_blhc 'debian-hardening-wrapper-pbuilder', '--buildd', 0, + 'I-hardening-wrapper-used|| +'; is_blhc 'buildd-verbose-build', '--buildd', 0, 'W-compiler-flags-hidden|1 (of 5) hidden|