Exemplo n.º 1
0
 def test_cwe243_01_mips(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'mips', self.string)
     assert res == expect_res
Exemplo n.º 2
0
 def test_cwe782_01_x64_gcc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'x64', 'gcc', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 3
0
 def test_cwe243_02_ppc64le_clang(self):
     expect_res = 0
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target + '_clean', 'ppc64le', 'clang', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 4
0
 def test_cwe457_01_ppc64le_gcc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'ppc64le', 'gcc', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 5
0
 def test_cwe457_01_mipsel_clang(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'mipsel', 'clang', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 6
0
 def test_cwe248_01_x86_clang(self):
     expect_res = 2
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'x86', 'clang++', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 7
0
 def test_cwe426_01_x86(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(self.target, self.target, 'x86', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 8
0
 def test_cwe215_01_x64(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.filename, self.target, 'x64', self.string)
     assert res == expect_res
Exemplo n.º 9
0
 def test_cwe560_01_mips64el_gcc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'mips64el', 'gcc', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 10
0
 def test_cwe416_01_arm_clang(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'arm', 'clang', self.string,
         self.check_name)
     self.assertEqual(res, expect_res)
Exemplo n.º 11
0
 def test_cwe416_01_mips_gcc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'mips', 'gcc', self.string,
         self.check_name)
     self.assertEqual(res, expect_res)
Exemplo n.º 12
0
 def test_cwe215_01_ppc_gcc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.filename, self.target, 'ppc', 'gcc', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 13
0
 def test_cwe243_02_x64(self):
     expect_res = 0
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target + "_clean", self.target, 'x64', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 14
0
 def test_cwe215_01_aarch64_clang(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.filename, self.target, 'aarch64', 'clang', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 15
0
 def test_cwe243_02_ppc(self):
     expect_res = 0
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target + "_clean", self.target, 'ppc', self.string)
     assert res == expect_res
Exemplo n.º 16
0
 def test_cwe415_01_aarch64_gcc(self):
     expect_res = 2
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'aarch64', 'gcc', self.string, self.check_name)
     self.assertEqual(res, expect_res)
Exemplo n.º 17
0
 def test_cwe476_02_mips(self):
     expect_res = 0
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target + "_clean", self.target, 'mips', self.string)
     assert res == expect_res
Exemplo n.º 18
0
 def test_cwe415_01_mips64_clang(self):
     expect_res = 2
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'mips64', 'clang', self.string, self.check_name)
     self.assertEqual(res, expect_res)
Exemplo n.º 19
0
 def test_cwe248_01_ppc64_gcc(self):
     expect_res = 2
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'ppc64', 'g++', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 20
0
 def test_cwe190_01_x86(self):
     expect_res = 3
     res = cwe_checker_testlib.execute_and_check_occurence(self.target, self.target, 'x86', self.string)
     assert res == expect_res
Exemplo n.º 21
0
 def test_cwe332_01_ppc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'ppc', self.string)
     assert res == expect_res
Exemplo n.º 22
0
 def test_cwe467_01_x64(self):
     expect_res = 2
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'x64', self.string)
     assert res == expect_res
Exemplo n.º 23
0
 def test_cwe457_01_x86_mingw_gcc(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'x86', 'mingw32-gcc', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 24
0
 def test_cwe248_01_arm(self):
     expect_res = 2
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'arm', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 25
0
 def test_cwe476_01_arm(self):
     expect_res = 1
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'arm', self.string)
     assert res == expect_res
Exemplo n.º 26
0
 def test_cwe190_01_x64_clang(self):
     expect_res = 3
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target, 'x64', 'clang', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 27
0
 def test_cwe190_01_mips(self):
     expect_res = 3
     res = cwe_checker_testlib.execute_and_check_occurence(self.target, self.target, 'mips', self.string)
     self.assertEqual(res, expect_res)
Exemplo n.º 28
0
 def test_cwe243_02_mips64el_gcc(self):
     expect_res = 0
     res = cwe_checker_testlib.execute_and_check_occurence(
         self.target, self.target + '_clean', 'mips64el', 'gcc', self.string)
     self.assertEqual(res, expect_res)