diff options
Diffstat (limited to 'android')
-rw-r--r-- | android/Android.ltp.mk | 8 | ||||
-rw-r--r-- | android/README.md | 8 | ||||
-rw-r--r-- | android/include/config.h | 3 | ||||
-rw-r--r-- | android/ltp_package_list.mk | 55 | ||||
-rw-r--r-- | android/tools/android_build_generator.py | 2 | ||||
-rwxr-xr-x | android/tools/compare_ltp_projects.py | 33 | ||||
-rw-r--r-- | android/tools/disabled_libs.txt | 2 | ||||
-rw-r--r-- | android/tools/disabled_tests.txt | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | android/tools/make_install_parser.py | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | android/tools/make_parser.py | 32 |
10 files changed, 109 insertions, 42 deletions
diff --git a/android/Android.ltp.mk b/android/Android.ltp.mk index b038104d2..4d29e2ab7 100644 --- a/android/Android.ltp.mk +++ b/android/Android.ltp.mk @@ -81,18 +81,10 @@ module_prebuilt := testcases/data/file01/in.c module_src_files := testcases/commands/file/datafiles/in.c include $(ltp_build_prebuilt) -module_prebuilt := testcases/data/file01/in.csh -module_src_files := testcases/commands/file/datafiles/in.csh -include $(ltp_build_prebuilt) - module_prebuilt := testcases/data/file01/in.jpg module_src_files := testcases/commands/file/datafiles/in.jpg include $(ltp_build_prebuilt) -module_prebuilt := testcases/data/file01/in.ksh -module_src_files := testcases/commands/file/datafiles/in.ksh -include $(ltp_build_prebuilt) - module_prebuilt := testcases/data/file01/in.m4 module_src_files := testcases/commands/file/datafiles/in.m4 include $(ltp_build_prebuilt) diff --git a/android/README.md b/android/README.md index 60462723d..3cda88e39 100644 --- a/android/README.md +++ b/android/README.md @@ -258,6 +258,12 @@ periodically running: `git clean -dfx && make autotools && ./configure && make -j` +Commit the LTP version string +``` +git describe <release commit> > VERSION +git add VERSION +``` + ### Update the Android build targets Building LTP with the Android build system requires the additional Android @@ -278,4 +284,4 @@ differences in the test suite. LTP_NEW=$ANDROID_BUILD_TOP/external/ltp LTP_OLD=/tmp/ltp-base git archive aosp/master | tar -x -C $LTP_OLD -android/tools/compare_ltp_projects.py --ltp-new $LTP_NEW --ltp-old $LTP_OLD +android/tools/compare_ltp_projects.py --ltp-new $LTP_NEW --ltp-old $LTP_OLD
\ No newline at end of file diff --git a/android/include/config.h b/android/include/config.h index 951da923d..514f10a18 100644 --- a/android/include/config.h +++ b/android/include/config.h @@ -111,6 +111,9 @@ /* Define to 1 if you have `io_set_eventfd' function. */ /* #undef HAVE_IO_SET_EVENTFD */ +/* Define to 1 if you have the <linux/ioprio.h> header file. */ +#define HAVE_LINUX_IOPRIO_H 1 + /* Define to 1 if you have the `kcmp' function. */ /* #undef HAVE_KCMP */ diff --git a/android/ltp_package_list.mk b/android/ltp_package_list.mk index 1e2d2aba6..49c8510d6 100644 --- a/android/ltp_package_list.mk +++ b/android/ltp_package_list.mk @@ -90,6 +90,7 @@ ltp_packages := \ ltp_cfs_bandwidth01 \ ltp_cgroup_core01 \ ltp_cgroup_core02 \ + ltp_cgroup_core03 \ ltp_cgroup_fj_proc \ ltp_cgroup_regression_fork_processes \ ltp_cgroup_regression_getdelays \ @@ -140,6 +141,7 @@ ltp_packages := \ ltp_clone09 \ ltp_clone301 \ ltp_clone302 \ + ltp_clone303 \ ltp_close01 \ ltp_close02 \ ltp_close_range01 \ @@ -256,8 +258,16 @@ ltp_packages := \ ltp_epoll_wait02 \ ltp_epoll_wait03 \ ltp_epoll_wait04 \ + ltp_epoll_wait05 \ + ltp_epoll_wait06 \ + ltp_epoll_wait07 \ ltp_event_generator \ ltp_eventfd01 \ + ltp_eventfd02 \ + ltp_eventfd03 \ + ltp_eventfd04 \ + ltp_eventfd05 \ + ltp_eventfd06 \ ltp_eventfd2_01 \ ltp_eventfd2_02 \ ltp_eventfd2_03 \ @@ -294,6 +304,9 @@ ltp_packages := \ ltp_f2 \ ltp_f3 \ ltp_faccessat01 \ + ltp_faccessat02 \ + ltp_faccessat201 \ + ltp_faccessat202 \ ltp_fallocate01 \ ltp_fallocate02 \ ltp_fallocate03 \ @@ -357,8 +370,6 @@ ltp_packages := \ ltp_fcntl04_64 \ ltp_fcntl05 \ ltp_fcntl05_64 \ - ltp_fcntl06 \ - ltp_fcntl06_64 \ ltp_fcntl07 \ ltp_fcntl07_64 \ ltp_fcntl08 \ @@ -470,6 +481,7 @@ ltp_packages := \ ltp_fs_perms \ ltp_fsconfig01 \ ltp_fsconfig02 \ + ltp_fsconfig03 \ ltp_fsetxattr01 \ ltp_fsetxattr02 \ ltp_fsmount01 \ @@ -675,6 +687,7 @@ ltp_packages := \ ltp_hugemmap29 \ ltp_hugemmap30 \ ltp_hugemmap31 \ + ltp_hugemmap32 \ ltp_icmp_rate_limit01 \ ltp_ima_boot_aggregate \ ltp_ima_mmap \ @@ -829,6 +842,7 @@ ltp_packages := \ ltp_madvise08 \ ltp_madvise09 \ ltp_madvise10 \ + ltp_madvise11 \ ltp_mallinfo01 \ ltp_mallinfo02 \ ltp_mallinfo2_01 \ @@ -907,7 +921,6 @@ ltp_packages := \ ltp_mmap04 \ ltp_mmap05 \ ltp_mmap06 \ - ltp_mmap07 \ ltp_mmap08 \ ltp_mmap09 \ ltp_mmap1 \ @@ -922,6 +935,7 @@ ltp_packages := \ ltp_mmap18 \ ltp_mmap19 \ ltp_mmap2 \ + ltp_mmap20 \ ltp_mmap3 \ ltp_mmapstress01 \ ltp_mmapstress02 \ @@ -945,6 +959,7 @@ ltp_packages := \ ltp_mount04 \ ltp_mount05 \ ltp_mount06 \ + ltp_mount07 \ ltp_mount_setattr01 \ ltp_move_mount01 \ ltp_move_mount02 \ @@ -963,10 +978,12 @@ ltp_packages := \ ltp_mprotect02 \ ltp_mprotect03 \ ltp_mprotect04 \ + ltp_mprotect05 \ ltp_mremap01 \ ltp_mremap02 \ ltp_mremap03 \ ltp_mremap05 \ + ltp_mremap06 \ ltp_msgget05 \ ltp_msync01 \ ltp_msync02 \ @@ -985,7 +1002,6 @@ ltp_packages := \ ltp_nanosleep02 \ ltp_nanosleep04 \ ltp_netstress \ - ltp_newns \ ltp_newuname01 \ ltp_nextafter01 \ ltp_nfs01_open_files \ @@ -1079,6 +1095,7 @@ ltp_packages := \ ltp_pipe11 \ ltp_pipe12 \ ltp_pipe13 \ + ltp_pipe14 \ ltp_pipe2_01 \ ltp_pipe2_02 \ ltp_pipe2_02_child \ @@ -1126,6 +1143,7 @@ ltp_packages := \ ltp_preadv203_64 \ ltp_print_caps \ ltp_proc01 \ + ltp_process_madvise01 \ ltp_process_vm01 \ ltp_process_vm_readv02 \ ltp_process_vm_readv03 \ @@ -1359,8 +1377,6 @@ ltp_packages := \ ltp_setgroups02_16 \ ltp_setgroups03 \ ltp_setgroups03_16 \ - ltp_setgroups04 \ - ltp_setgroups04_16 \ ltp_sethostname01 \ ltp_sethostname02 \ ltp_sethostname03 \ @@ -1484,6 +1500,7 @@ ltp_packages := \ ltp_ssetmask01 \ ltp_stack_clash \ ltp_stack_space \ + ltp_starvation \ ltp_stat01 \ ltp_stat01_64 \ ltp_stat02 \ @@ -1505,6 +1522,9 @@ ltp_packages := \ ltp_statx06 \ ltp_statx08 \ ltp_statx09 \ + ltp_statx10 \ + ltp_statx11 \ + ltp_statx12 \ ltp_stream01 \ ltp_stream02 \ ltp_stream03 \ @@ -1547,6 +1567,7 @@ ltp_packages := \ ltp_syslog11 \ ltp_syslog12 \ ltp_tbio \ + ltp_tcindex01 \ ltp_tee01 \ ltp_tee02 \ ltp_test01 \ @@ -1957,6 +1978,7 @@ ltp_packages := \ ltp_testcases_bin_nfs05.sh \ ltp_testcases_bin_nfs06.sh \ ltp_testcases_bin_nfs07.sh \ + ltp_testcases_bin_nfs08.sh \ ltp_testcases_bin_nfs_lib.sh \ ltp_testcases_bin_nfslock01.sh \ ltp_testcases_bin_nfsstat01.sh \ @@ -2352,7 +2374,6 @@ ltp_packages := \ ltp_testcases_bin_test_controllers.sh \ ltp_testcases_bin_test_ioctl \ ltp_testcases_bin_test_robind.sh \ - ltp_testcases_bin_testall.sh \ ltp_testcases_bin_tracepath01.sh \ ltp_testcases_bin_traceroute01.sh \ ltp_testcases_bin_tst_ansi_color.sh \ @@ -2448,9 +2469,7 @@ ltp_packages := \ ltp_testcases_data_file01_in.ar \ ltp_testcases_data_file01_in.bash \ ltp_testcases_data_file01_in.c \ - ltp_testcases_data_file01_in.csh \ ltp_testcases_data_file01_in.jpg \ - ltp_testcases_data_file01_in.ksh \ ltp_testcases_data_file01_in.m4 \ ltp_testcases_data_file01_in.mp3 \ ltp_testcases_data_file01_in.pl \ @@ -2519,14 +2538,6 @@ ltp_packages := \ ltp_times03 \ ltp_tkill01 \ ltp_tkill02 \ - ltp_tomoyo_accept_test \ - ltp_tomoyo_file_test \ - ltp_tomoyo_filesystem_test \ - ltp_tomoyo_new_file_test \ - ltp_tomoyo_new_test \ - ltp_tomoyo_policy_io_test \ - ltp_tomoyo_policy_memory_test \ - ltp_tomoyo_rewrite_test \ ltp_tpci \ ltp_trace_sched \ ltp_trerrno \ @@ -2557,6 +2568,7 @@ ltp_packages := \ ltp_tst_fs_fill_hardlinks \ ltp_tst_fs_fill_subdirs \ ltp_tst_fs_has_free \ + ltp_tst_fsfreeze \ ltp_tst_fuzzy_sync01 \ ltp_tst_fuzzy_sync02 \ ltp_tst_fuzzy_sync03 \ @@ -2566,6 +2578,7 @@ ltp_packages := \ ltp_tst_getconf \ ltp_tst_hexdump \ ltp_tst_kvcmp \ + ltp_tst_lockdown_enabled \ ltp_tst_ncpus \ ltp_tst_ncpus_conf \ ltp_tst_ncpus_max \ @@ -2580,6 +2593,9 @@ ltp_packages := \ ltp_tst_net_iface_prefix \ ltp_tst_net_ip_prefix \ ltp_tst_net_vars \ + ltp_tst_ns_create \ + ltp_tst_ns_exec \ + ltp_tst_ns_ifmove \ ltp_tst_print_result \ ltp_tst_process_state \ ltp_tst_random \ @@ -2590,6 +2606,7 @@ ltp_packages := \ ltp_tst_rod \ ltp_tst_safe_fileops \ ltp_tst_safe_macros \ + ltp_tst_secureboot_enabled \ ltp_tst_sleep \ ltp_tst_strerrno \ ltp_tst_strsig \ @@ -2628,6 +2645,10 @@ ltp_packages := \ ltp_utime06 \ ltp_utimensat01 \ ltp_utimes01 \ + ltp_utsname01 \ + ltp_utsname02 \ + ltp_utsname03 \ + ltp_utsname04 \ ltp_variant \ ltp_verify_caps_exec \ ltp_vfork \ diff --git a/android/tools/android_build_generator.py b/android/tools/android_build_generator.py index 9d674059b..2ef583242 100644 --- a/android/tools/android_build_generator.py +++ b/android/tools/android_build_generator.py @@ -363,6 +363,8 @@ class BuildGenerator(object): # some targets may have a mix of .c and .o files in srcs # find the .c files to build those .o from cc_compile targets if i.endswith('.o'): + if i not in cc_compile: + raise Exception("Not found: %s when trying to compile target %s" % (i, target)) local_src_files.extend(cc_compile[i]) else: local_src_files.append(i) diff --git a/android/tools/compare_ltp_projects.py b/android/tools/compare_ltp_projects.py index 33e06ec0e..0863bdf8a 100755 --- a/android/tools/compare_ltp_projects.py +++ b/android/tools/compare_ltp_projects.py @@ -134,21 +134,20 @@ def show_diff(ltp_tests_1, ltp_tests_2): ltp_tests_1: dictionary of tests keyed by test suite names ltp_tests_2: dictionary of tests keyed by test suite names ''' - DEFAULT_WIDTH = 8 - test_suites1 = set(sorted(ltp_tests_1.keys())) - test_suites2 = set(sorted(ltp_tests_2.keys())) + test_suites1 = set(ltp_tests_1.keys()) + test_suites2 = set(ltp_tests_2.keys()) # Generate lists of deleted, added and common test suites between # LTP1 & LTP2 deleted_test_suites = sorted(test_suites1.difference(test_suites2)) added_test_suites = sorted(test_suites2.difference(test_suites1)) - common_test_suites = sorted(test_suites1.intersection(test_suites2)) + common_test_suites = test_suites1.intersection(test_suites2) deleted_tests = [] added_tests = [] for suite in common_test_suites: - tests1 = set(sorted(ltp_tests_1[suite])) - tests2 = set(sorted(ltp_tests_2[suite])) + tests1 = set(ltp_tests_1[suite]) + tests2 = set(ltp_tests_2[suite]) exclusive_test1 = tests1.difference(tests2) exclusive_test2 = tests2.difference(tests1) @@ -156,7 +155,13 @@ def show_diff(ltp_tests_1, ltp_tests_2): deleted_tests.append(suite + '.' + e) for e in exclusive_test2: added_tests.append(suite + '.' + e) + deleted_tests = sorted(deleted_tests) + added_tests = sorted(added_tests) + print_columns(added_test_suites, deleted_test_suites, added_tests, deleted_tests) + +def print_columns(added_test_suites, deleted_test_suites, added_tests, deleted_tests): + DEFAULT_WIDTH = 8 # find the maximum width of a test suite name or test name # we have to print to decide the alignment. if not deleted_test_suites: @@ -172,26 +177,26 @@ def show_diff(ltp_tests_1, ltp_tests_2): # total rows we have to print total_rows = max(len(deleted_test_suites), len(added_test_suites)) - deleted_text = 'Deleted ({})'.format(len(deleted_test_suites)) added_text = 'Added ({})'.format(len(added_test_suites)) + deleted_text = 'Deleted ({})'.format(len(deleted_test_suites)) if total_rows > 0: print('{:*^{len}}'.format(' Tests Suites ', len=width*2+2)) - print('{:>{len}} {:>{len}}'.format(deleted_text, added_text, len=width)) + print('{:<{len}} {:<{len}}'.format(added_text, deleted_text, len=width)) for i in range(total_rows): - print('{:>{len}} {:>{len}}'.format('' if i >= len(deleted_test_suites) else str(deleted_test_suites[i]), - '' if i >= len(added_test_suites) else str(added_test_suites[i]), len=width)) + print('{:<{len}} {:<{len}}'.format('' if i >= len(added_test_suites) else str(added_test_suites[i]), + '' if i >= len(deleted_test_suites) else str(deleted_test_suites[i]), len=width)) print('') # total rows we have to print total_rows = max(len(deleted_tests), len(added_tests)) - deleted_text = 'Deleted ({})'.format(len(deleted_tests)) added_text = 'Added ({})'.format(len(added_tests)) + deleted_text = 'Deleted ({})'.format(len(deleted_tests)) if total_rows: print('{:*^{len}}'.format(' Tests ', len=width*2+2)) - print('{:>{len}} {:>{len}}'.format(deleted_text, added_text, len=width)) + print('{:^{len}} {:^{len}}'.format(added_text, deleted_text, len=width)) for i in range(total_rows): - print('{:>{len}} {:>{len}}'.format('' if i >= len(deleted_tests) else str(deleted_tests[i]), - '' if i >= len(added_tests) else str(added_tests[i]), len=width)) + print('{:<{len}} {:<{len}}'.format('' if i >= len(added_tests) else str(added_tests[i]), + '' if i >= len(deleted_tests) else str(deleted_tests[i]), len=width)) def main(): arg_parser = argparse.ArgumentParser( description='Diff 2 LTP projects for supported test cases') diff --git a/android/tools/disabled_libs.txt b/android/tools/disabled_libs.txt index f2ede3289..0f648ab32 100644 --- a/android/tools/disabled_libs.txt +++ b/android/tools/disabled_libs.txt @@ -1,2 +1,4 @@ # List of tests which cannot (currently) be built for Android/bionic. # Every test case that requires this lib will also need be disabled + +bootstrap_x86_64 diff --git a/android/tools/disabled_tests.txt b/android/tools/disabled_tests.txt index e545c21fe..dfa8902ee 100644 --- a/android/tools/disabled_tests.txt +++ b/android/tools/disabled_tests.txt @@ -355,6 +355,7 @@ pipeio mq_timedsend01 mq_notify01 mq_notify02 +mq_notify03 mq_open01 mq_timedreceive01 mq_unlink01 @@ -617,6 +618,12 @@ set_mempolicy05 # b/246845416 kvm_pagefault01 kvm_pagefault01-payload.elf +kvm_svm01 +kvm_svm01-payload.elf +kvm_svm02 +kvm_svm02-payload.elf +kvm_svm03 +kvm_svm03-payload.elf # Redefines cacheflush # b/277960476 diff --git a/android/tools/make_install_parser.py b/android/tools/make_install_parser.py index bc94d7e76..75d9fa3f8 100644..100755 --- a/android/tools/make_install_parser.py +++ b/android/tools/make_install_parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # # Copyright 2016 - The Android Open Source Project # diff --git a/android/tools/make_parser.py b/android/tools/make_parser.py index d845569fe..59796c4aa 100644..100755 --- a/android/tools/make_parser.py +++ b/android/tools/make_parser.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python # # Copyright 2016 - The Android Open Source Project # @@ -23,6 +24,7 @@ import fileinput import pprint AR = 'ar' +AS = 'as' CC = 'gcc' class MakeParser(object): @@ -31,6 +33,7 @@ class MakeParser(object): Attributes: ltp_root: string, LTP root directory ar_parser: archive (ar) command argument parser + as_parser: assembly (as) command argument parser cc_parser: gcc command argument parser result: list of string, result string buffer dir_stack: list of string, directory stack for parsing make commands @@ -43,6 +46,11 @@ class MakeParser(object): ar_parser.add_argument('-c', dest='c', action='store') self.ar_parser = ar_parser + as_parser = argparse.ArgumentParser() + as_parser.add_argument('-c', dest='compile', action='store_true') + as_parser.add_argument('-o', dest='target', action='store') + self.as_parser = as_parser + cc_parser = argparse.ArgumentParser() cc_parser.add_argument('-D', dest='defines', action='append') cc_parser.add_argument('-I', dest='includes', action='append') @@ -78,10 +86,10 @@ class MakeParser(object): return [self.GetRelativePath(i) for i in paths if i[-1] in extensions] def ParseAr(self, line): - '''Parse a archive command line. + '''Parse an archive command line. Args: - line: string, a line of ar command to parse + line: string, a line of as command to parse ''' args, unparsed = self.ar_parser.parse_known_args(line.split()[1:]) @@ -105,6 +113,24 @@ class MakeParser(object): self.result.append("ar['%s'] = %s" % (target, sources)) + def ParseAs(self, line): + '''Parse an assembly command line. + + Args: + line: string, a line of as command to parse + ''' + args, unparsed = self.as_parser.parse_known_args(line.split()[1:]) + + sources = self.GetRelativePathForExtensions(unparsed, ['S']) + + assert len(sources) > 0 + target = self.GetRelativePath(args.target) + + if args.compile: + self.result.append("cc_compile['%s'] = %s" % (target, sources)) + else: + raise Exception("Unparsed assembly line: %s" % line) + def ParseCc(self, line): '''Parse a gcc command line. @@ -179,6 +205,8 @@ class MakeParser(object): self.dir_stack.pop() elif line.startswith(AR): self.ParseAr(line) + elif line.startswith(AS): + self.ParseAs(line) elif line.startswith(CC): self.ParseCc(line) |