1//
2// Copyright (C) 2016 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_applicable_licenses: ["external_linux-kselftest_license"],
19}
20
21// Added automatically by a large-scale-change that took the approach of
22// 'apply every license found to every target'. While this makes sure we respect
23// every license restriction, it may not be entirely correct.
24//
25// e.g. GPL in an MIT project might only apply to the contrib/ directory.
26//
27// Please consider splitting the single license below into multiple licenses,
28// taking care not to lose any license_kind information, and overriding the
29// default license using the 'licenses: [...]' property on targets as needed.
30//
31// For unused files, consider creating a 'fileGroup' with "//visibility:private"
32// to attach the license to, and including a comment whether the files may be
33// used in the current project.
34//
35// large-scale-change included anything that looked like it might be a license
36// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
37//
38// Please consider removing redundant or irrelevant files from 'license_text:'.
39// See: http://go/android-license-faq
40license {
41    name: "external_linux-kselftest_license",
42    visibility: [":__subpackages__"],
43    license_kinds: [
44        "SPDX-license-identifier-Apache-2.0",
45        "SPDX-license-identifier-BSD-2-Clause",
46        "SPDX-license-identifier-BSD-3-Clause",
47        "SPDX-license-identifier-CC0-1.0",
48        "SPDX-license-identifier-GPL",
49        "SPDX-license-identifier-GPL-2.0",
50        "SPDX-license-identifier-GPL-3.0",
51        "SPDX-license-identifier-LGPL",
52        "SPDX-license-identifier-LGPL-2.1",
53        "SPDX-license-identifier-MIT",
54        "SPDX-license-identifier-Unlicense",
55    ],
56    license_text: [
57        "COPYING",
58        "NOTICE",
59    ],
60}
61
62cc_defaults {
63    name: "kselftest_defaults",
64    cflags: [
65        // Hacks for bionic compatibility
66        "-include bionic-compat.h",
67
68        "-Wall",
69
70        // Silence noisy warnings
71        "-Wno-deprecated",
72        "-Wno-format",
73        "-Wno-gnu-designator",
74        "-Wno-macro-redefined",
75        "-Wno-missing-field-initializers",
76        "-Wno-parentheses-equality",
77        "-Wno-pointer-arith",
78        "-Wno-sign-compare",
79        "-Wno-unused-parameter",
80        "-Wno-shift-negative-value",
81        "-Wno-switch",
82        "-Wno-absolute-value",
83        "-Wno-non-literal-null-conversion",
84        "-Wno-unused-value",
85        "-Wno-unused-variable",
86        "-Wno-unused-parameter",
87        "-Wno-empty-body",
88        "-Wno-literal-conversion",
89        "-Werror",
90    ],
91
92    local_include_dirs: ["android/include"],
93    gtest: false,
94    no_named_install_directory: true,
95
96    test_per_src: true,
97}
98
99// breakpoints test
100cc_test {
101    name: "kselftest_breakpoints_tests",
102    relative_install_path: "linux-kselftest/breakpoints",
103    srcs: [
104        "tools/testing/selftests/breakpoints/step_after_suspend_test.c",
105    ],
106    defaults: ["kselftest_defaults"],
107    arch: {
108        arm: {
109            enabled: false,
110        },
111        arm64: {
112            srcs: [
113                "tools/testing/selftests/breakpoints/breakpoint_test_arm64.c",
114            ],
115        },
116        x86: {
117            srcs: [
118                "tools/testing/selftests/breakpoints/breakpoint_test.c",
119            ],
120        },
121    },
122}
123
124// capabilities test
125cc_test {
126    name: "kselftest_capabilities_test",
127    relative_install_path: "linux-kselftest/capabilities",
128    srcs: [
129        "tools/testing/selftests/capabilities/test_execve.c",
130        "tools/testing/selftests/capabilities/validate_cap.c",
131    ],
132    defaults: ["kselftest_defaults"],
133    static_libs: ["libcap-ng"],
134}
135
136// Cpu-hotplug test
137sh_test {
138    name: "kselftest_cpu-hotplug_cpu-on-off-test",
139    sub_dir: "linux-kselftest/cpu-hotplug",
140    src: "tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh",
141    filename_from_src: true,
142    compile_multilib: "both",
143}
144
145// Efivarfs test
146cc_test {
147    name: "kselftest_efivarfs_tests",
148    relative_install_path: "linux-kselftest/efivarfs",
149    srcs: [
150        "tools/testing/selftests/efivarfs/open-unlink.c",
151        "tools/testing/selftests/efivarfs/create-read.c",
152    ],
153    defaults: ["kselftest_defaults"],
154}
155
156sh_test {
157    name: "kselftest_efivarfs_efivarfs",
158    sub_dir: "linux-kselftest/efivarfs",
159    src: "tools/testing/selftests/efivarfs/efivarfs.sh",
160    filename_from_src: true,
161    compile_multilib: "both",
162}
163
164// Exec test
165cc_test {
166    name: "kselftest_exec_test",
167    relative_install_path: "linux-kselftest/exec",
168    srcs: [
169        "tools/testing/selftests/exec/execveat.c",
170    ],
171    defaults: ["kselftest_defaults"],
172}
173
174sh_test {
175    name: "kselftest_exec_execveat.sh",
176    sub_dir: "linux-kselftest/exec",
177    src: "tools/testing/selftests/exec/execveat.sh",
178    filename_from_src: true,
179    compile_multilib: "both",
180}
181
182// Firmware test
183sh_test {
184    name: "kselftest_firmware_fw_fallback",
185    sub_dir: "linux-kselftest/firmware",
186    src: "tools/testing/selftests/firmware/fw_fallback.sh",
187    filename_from_src: true,
188    compile_multilib: "both",
189}
190
191sh_test {
192    name: "kselftest_firmware_fw_filesystem",
193    sub_dir: "linux-kselftest/firmware",
194    src: "tools/testing/selftests/firmware/fw_filesystem.sh",
195    filename_from_src: true,
196    compile_multilib: "both",
197}
198
199// Ftrace test
200sh_test {
201    name: "kselftest_ftrace_ftracetest",
202    sub_dir: "linux-kselftest/ftrace",
203    src: "tools/testing/selftests/ftrace/ftracetest",
204    filename_from_src: true,
205    compile_multilib: "both",
206}
207
208sh_test {
209    name: "kselftest_ftrace_test.d_functions",
210    sub_dir: "linux-kselftest/ftrace/test.d",
211    src: "tools/testing/selftests/ftrace/test.d/functions",
212    filename_from_src: true,
213    compile_multilib: "both",
214}
215
216sh_test {
217    name: "kselftest_ftrace_test.d_00basic_basic2",
218    sub_dir: "linux-kselftest/ftrace/test.d/00basic",
219    src: "tools/testing/selftests/ftrace/test.d/00basic/basic2.tc",
220    filename_from_src: true,
221    compile_multilib: "both",
222}
223
224sh_test {
225    name: "kselftest_ftrace_test.d_00basic_basic4",
226    sub_dir: "linux-kselftest/ftrace/test.d/00basic",
227    src: "tools/testing/selftests/ftrace/test.d/00basic/basic4.tc",
228    filename_from_src: true,
229    compile_multilib: "both",
230}
231
232sh_test {
233    name: "kselftest_ftrace_test.d_00basic_basic1",
234    sub_dir: "linux-kselftest/ftrace/test.d/00basic",
235    src: "tools/testing/selftests/ftrace/test.d/00basic/basic1.tc",
236    filename_from_src: true,
237    compile_multilib: "both",
238}
239
240sh_test {
241    name: "kselftest_ftrace_test.d_00basic_basic3",
242    sub_dir: "linux-kselftest/ftrace/test.d/00basic",
243    src: "tools/testing/selftests/ftrace/test.d/00basic/basic3.tc",
244    filename_from_src: true,
245    compile_multilib: "both",
246}
247
248sh_test {
249    name: "kselftest_ftrace_test.d_template",
250    sub_dir: "linux-kselftest/ftrace/test.d",
251    src: "tools/testing/selftests/ftrace/test.d/template",
252    filename_from_src: true,
253    compile_multilib: "both",
254}
255
256sh_test {
257    name: "kselftest_ftrace_test.d_instances_instance",
258    sub_dir: "linux-kselftest/ftrace/test.d/instances",
259    src: "tools/testing/selftests/ftrace/test.d/instances/instance.tc",
260    filename_from_src: true,
261    compile_multilib: "both",
262}
263
264sh_test {
265    name: "kselftest_ftrace_test.d_instances_instance-event",
266    sub_dir: "linux-kselftest/ftrace/test.d/instances",
267    src: "tools/testing/selftests/ftrace/test.d/instances/instance-event.tc",
268    filename_from_src: true,
269    compile_multilib: "both",
270}
271
272// Futex test
273cc_test {
274    name: "kselftest_futex_tests",
275    relative_install_path: "linux-kselftest/futex/functional",
276    srcs: [
277        "tools/testing/selftests/futex/functional/futex_requeue_pi.c",
278        "tools/testing/selftests/futex/functional/futex_requeue_pi_mismatched_ops.c",
279        "tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart.c",
280        "tools/testing/selftests/futex/functional/futex_wait_private_mapped_file.c",
281        "tools/testing/selftests/futex/functional/futex_wait_timeout.c",
282        "tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap.c",
283        "tools/testing/selftests/futex/functional/futex_wait_wouldblock.c",
284    ],
285    local_include_dirs: [
286        "tools/testing/selftests/futex/include",
287        "tools/testing/selftests",
288    ],
289    cflags: [
290        "-D_GNU_SOURCE",
291        "-pthread",
292    ],
293    defaults: ["kselftest_defaults"],
294}
295
296sh_test {
297    name: "kselftest_futex_functional_run.sh",
298    sub_dir: "linux-kselftest/futex/functional",
299    src: "tools/testing/selftests/futex/functional/run.sh",
300    filename_from_src: true,
301    compile_multilib: "both",
302}
303
304// intel_pstate test
305cc_test {
306    name: "kselftest_intel_pstate_tests",
307    relative_install_path: "linux-kselftest/intel_pstate",
308    srcs: [
309        "tools/testing/selftests/intel_pstate/aperf.c",
310        "tools/testing/selftests/intel_pstate/msr.c",
311    ],
312    cflags: [
313        "-D_GNU_SOURCE",
314    ],
315    defaults: ["kselftest_defaults"],
316    // TODO: test_data: intel_pstate/run.sh
317}
318
319sh_test {
320    name: "kselftest_intel_pstate_run.sh",
321    sub_dir: "linux-kselftest/intel_pstate",
322    src: "tools/testing/selftests/intel_pstate/run.sh",
323    filename_from_src: true,
324    compile_multilib: "both",
325}
326
327// Kcmp test
328cc_test {
329    name: "kselftest_kcmp_tests",
330    relative_install_path: "linux-kselftest/kcmp",
331    srcs: ["tools/testing/selftests/kcmp/kcmp_test.c"],
332    defaults: ["kselftest_defaults"],
333}
334
335// Lib test
336sh_test {
337    name: "kselftest_lib_printf",
338    sub_dir: "linux-kselftest/lib",
339    src: "tools/testing/selftests/lib/printf.sh",
340    filename_from_src: true,
341    compile_multilib: "both",
342}
343
344sh_test {
345    name: "kselftest_lib_bitmap",
346    sub_dir: "linux-kselftest/lib",
347    src: "tools/testing/selftests/lib/bitmap.sh",
348    filename_from_src: true,
349    compile_multilib: "both",
350}
351
352// media_tests test
353cc_test {
354    name: "kselftest_media_tests",
355    relative_install_path: "linux-kselftest/media_tests",
356    srcs: [
357        "tools/testing/selftests/media_tests/media_device_test.c",
358        "tools/testing/selftests/media_tests/media_device_open.c",
359        "tools/testing/selftests/media_tests/video_device_test.c",
360    ],
361    defaults: ["kselftest_defaults"],
362}
363
364// Membarrier test
365cc_test {
366    name: "kselftest_membarrier_tests",
367    relative_install_path: "linux-kselftest/membarrier",
368    srcs: [
369        "tools/testing/selftests/membarrier/membarrier_test_multi_thread.c",
370        "tools/testing/selftests/membarrier/membarrier_test_single_thread.c",
371    ],
372    defaults: ["kselftest_defaults"],
373}
374
375// Memory-hotplug test
376sh_test {
377    name: "kselftest_memory-hotplug_mem-on-off-test",
378    sub_dir: "linux-kselftest/memory-hotplug",
379    src: "tools/testing/selftests/memory-hotplug/mem-on-off-test.sh",
380    filename_from_src: true,
381    compile_multilib: "both",
382}
383
384// Mount test
385cc_test {
386    name: "kselftest_mount_tests",
387    relative_install_path: "linux-kselftest/mount",
388    srcs: ["tools/testing/selftests/mount/unprivileged-remount-test.c"],
389    defaults: ["kselftest_defaults"],
390}
391
392// Net test
393cc_test {
394    name: "kselftest_net_tests",
395    relative_install_path: "linux-kselftest/net",
396    srcs: [
397        "tools/testing/selftests/net/socket.c",
398        "tools/testing/selftests/net/psock_fanout.c",
399        "tools/testing/selftests/net/psock_tpacket.c",
400        "tools/testing/selftests/net/reuseport_dualstack.c",
401        "tools/testing/selftests/net/reuseaddr_conflict.c",
402    ],
403    defaults: ["kselftest_defaults"],
404    // TODO: test_data: net/test_bpf.sh
405}
406
407sh_test {
408    name: "kselftest_net_test_bpf",
409    sub_dir: "linux-kselftest/net",
410    src: "tools/testing/selftests/net/test_bpf.sh",
411    filename_from_src: true,
412    compile_multilib: "both",
413}
414
415// Pstore test
416sh_test {
417    name: "kselftest_pstore_pstore_tests",
418    sub_dir: "linux-kselftest/pstore",
419    src: "tools/testing/selftests/pstore/pstore_tests",
420    filename_from_src: true,
421    compile_multilib: "both",
422}
423
424sh_test {
425    name: "kselftest_pstore_pstore_post_reboot_tests",
426    sub_dir: "linux-kselftest/pstore",
427    src: "tools/testing/selftests/pstore/pstore_post_reboot_tests",
428    filename_from_src: true,
429    compile_multilib: "both",
430}
431
432sh_test {
433    name: "kselftest_pstore_common_tests",
434    sub_dir: "linux-kselftest/pstore",
435    src: "tools/testing/selftests/pstore/common_tests",
436    filename_from_src: true,
437    compile_multilib: "both",
438}
439
440sh_test {
441    name: "kselftest_pstore_pstore_crash_test",
442    sub_dir: "linux-kselftest/pstore",
443    src: "tools/testing/selftests/pstore/pstore_crash_test",
444    filename_from_src: true,
445    compile_multilib: "both",
446}
447
448// Ptrace test
449cc_test {
450    name: "kselftest_ptrace_tests",
451    relative_install_path: "linux-kselftest/ptrace",
452    srcs: ["tools/testing/selftests/ptrace/peeksiginfo.c"],
453    defaults: ["kselftest_defaults"],
454}
455
456// rtc test
457cc_test {
458    name: "kselftest_rtc_tests",
459    relative_install_path: "linux-kselftest/rtc",
460    srcs: ["tools/testing/selftests/rtc/rtctest.c"],
461    defaults: ["kselftest_defaults"],
462}
463
464// seccomp test
465cc_test {
466    name: "kselftest_seccomp_tests",
467    relative_install_path: "linux-kselftest/seccomp",
468    srcs: ["tools/testing/selftests/seccomp/seccomp_bpf.c"],
469    defaults: ["kselftest_defaults"],
470}
471
472// size test
473cc_test {
474    name: "kselftest_size_test",
475    relative_install_path: "linux-kselftest/size",
476    srcs: ["tools/testing/selftests/size/get_size.c"],
477    arch: {
478       x86_64: {
479           cflags: ["-mstackrealign"],
480       },
481    },
482    defaults: ["kselftest_defaults"],
483    nocrt: true,
484    // coverage runtime calls atexit, which is unavailable with nocrt.
485    native_coverage: false,
486}
487
488// splice test
489cc_test {
490    name: "kselftest_splice_test",
491    relative_install_path: "linux-kselftest/splice",
492    srcs: ["tools/testing/selftests/splice/default_file_splice_read.c"],
493    defaults: ["kselftest_defaults"],
494}
495
496sh_test {
497    name: "kselftest_splice_default_file_splice_read.sh",
498    sub_dir: "linux-kselftest/splice",
499    src: "tools/testing/selftests/splice/default_file_splice_read.sh",
500    filename_from_src: true,
501    compile_multilib: "both",
502}
503
504// Static keys test
505sh_test {
506    name: "kselftest_static_keys_test_static_keys",
507    sub_dir: "linux-kselftest/static_keys",
508    src: "tools/testing/selftests/static_keys/test_static_keys.sh",
509    filename_from_src: true,
510    compile_multilib: "both",
511}
512
513// Timer test
514cc_test {
515    name: "kselftest_timer_tests",
516    relative_install_path: "linux-kselftest/timers",
517    srcs: [
518        "tools/testing/selftests/timers/adjtick.c",
519        "tools/testing/selftests/timers/alarmtimer-suspend.c",
520        "tools/testing/selftests/timers/change_skew.c",
521        "tools/testing/selftests/timers/clocksource-switch.c",
522        "tools/testing/selftests/timers/freq-step.c",
523        "tools/testing/selftests/timers/inconsistency-check.c",
524        "tools/testing/selftests/timers/leap-a-day.c",
525        "tools/testing/selftests/timers/leapcrash.c",
526        "tools/testing/selftests/timers/nanosleep.c",
527        "tools/testing/selftests/timers/nsleep-lat.c",
528        "tools/testing/selftests/timers/posix_timers.c",
529        "tools/testing/selftests/timers/raw_skew.c",
530        "tools/testing/selftests/timers/set-2038.c",
531        "tools/testing/selftests/timers/set-tai.c",
532        "tools/testing/selftests/timers/set-timer-lat.c",
533        "tools/testing/selftests/timers/set-tz.c",
534        "tools/testing/selftests/timers/skew_consistency.c",
535        "tools/testing/selftests/timers/threadtest.c",
536        "tools/testing/selftests/timers/valid-adjtimex.c",
537    ],
538    cflags: [
539        "-O3",
540        "-DKTEST",
541    ],
542    defaults: ["kselftest_defaults"],
543}
544
545// User test
546sh_test {
547    name: "kselftest_user_test_user_copy",
548    sub_dir: "linux-kselftest/user",
549    src: "tools/testing/selftests/user/test_user_copy.sh",
550    filename_from_src: true,
551    compile_multilib: "both",
552}
553
554// vdso test
555cc_test {
556    name: "kselftest_vdso_test",
557    relative_install_path: "linux-kselftest/vDSO",
558    srcs: [
559        "tools/testing/selftests/vDSO/parse_vdso.c",
560        "tools/testing/selftests/vDSO/vdso_test.c",
561    ],
562    defaults: ["kselftest_defaults"],
563    test_per_src: false,
564}
565
566// Vm test
567cc_test {
568    name: "kselftest_vm_tests",
569    relative_install_path: "linux-kselftest/vm",
570    srcs: [
571        "tools/testing/selftests/vm/compaction_test.c",
572        "tools/testing/selftests/vm/hugepage-mmap.c",
573        "tools/testing/selftests/vm/hugepage-shm.c",
574        "tools/testing/selftests/vm/map_hugetlb.c",
575        "tools/testing/selftests/vm/mlock-random-test.c",
576        "tools/testing/selftests/vm/mlock2-tests.c",
577        "tools/testing/selftests/vm/on-fault-limit.c",
578        "tools/testing/selftests/vm/thuge-gen.c",
579        "tools/testing/selftests/vm/transhuge-stress.c",
580    ],
581    defaults: ["kselftest_defaults"],
582    static_libs: ["libcap"],
583}
584
585cc_test {
586    name: "kselftest_vm64_tests",
587    relative_install_path: "linux-kselftest/vm",
588    srcs: [
589        "tools/testing/selftests/vm/virtual_address_range.c",
590    ],
591    defaults: ["kselftest_defaults"],
592    enabled: false,
593    arch: {
594        arm64: {
595            enabled: true,
596            cflags: ["-D__aarch64__"],
597        },
598    },
599}
600
601sh_test {
602    name: "kselftest_vm_run_vmtests",
603    sub_dir: "linux-kselftest/vm",
604    src: "tools/testing/selftests/vm/run_vmtests",
605    filename_from_src: true,
606    compile_multilib: "both",
607}
608
609// x86 tests
610cc_test {
611    name: "kselftest_x86_tests",
612    relative_install_path: "linux-kselftest/x86",
613    srcs: [
614        "tools/testing/selftests/x86/single_step_syscall.c",
615        "tools/testing/selftests/x86/syscall_nt.c",
616        "tools/testing/selftests/x86/test_mremap_vdso.c",
617        "tools/testing/selftests/x86/ldt_gdt.c",
618        "tools/testing/selftests/x86/syscall_arg_fault.c",
619    ],
620    arch: {
621        arm: {
622            enabled: false,
623        },
624        arm64: {
625            enabled: false,
626        },
627        x86_64: {
628            enabled: true,
629            static_libs: [
630                "libdl",
631            ],
632        },
633        x86: {
634            srcs: [
635                //"tools/testing/selftests/x86/entry_from_vm86.c",
636                "tools/testing/selftests/x86/unwind_vdso.c",
637                "tools/testing/selftests/x86/test_FCMOV.c",
638                "tools/testing/selftests/x86/test_FCOMI.c",
639                "tools/testing/selftests/x86/test_FISTTP.c",
640                "tools/testing/selftests/x86/vdso_restorer.c",
641            ],
642            static_libs: [
643                "libdl",
644            ],
645        },
646    },
647    cflags: [
648        "-O2",
649        "-pthread",
650    ],
651    c_std: "gnu99",
652    static_executable: true,
653    defaults: ["kselftest_defaults"],
654}
655
656cc_test {
657    name: "kselftest_x86_check_initial_reg_state",
658    stem: "check_initial_reg_state",
659    relative_install_path: "linux-kselftest/x86",
660    srcs: [
661        "tools/testing/selftests/x86/check_initial_reg_state.c",
662    ],
663    arch: {
664        arm: {
665            enabled: false,
666        },
667        arm64: {
668            enabled: false,
669        },
670        x86: {
671            enabled: true,
672        },
673        x86_64: {
674            enabled: true,
675        },
676    },
677    cflags: [
678        "-O2",
679        "-pthread",
680    ],
681    c_std: "gnu99",
682    // check_initial_reg_state is special: it needs a custom entry, and it needs to be static so
683    // that its interpreter doesn't destroy its initial state.
684    ldflags: ["-Wl,-ereal_start"],
685    static_executable: true,
686    test_per_src: false,
687    defaults: ["kselftest_defaults"],
688}
689
690cc_test {
691    name: "kselftest_x86_ptrace_syscall",
692    stem: "ptrace_syscall",
693    relative_install_path: "linux-kselftest/x86",
694    srcs: [
695        "tools/testing/selftests/x86/ptrace_syscall.c",
696    ],
697    cflags: [
698        "-O2",
699        "-pthread",
700    ],
701    c_std: "gnu99",
702    test_per_src: false,
703    defaults: ["kselftest_defaults"],
704    enabled: false,
705    arch: {
706        x86: {
707            enabled: true,
708            srcs: [
709                "tools/testing/selftests/x86/raw_syscall_helper_32.S",
710            ],
711        },
712        x86_64: {
713            enabled: true,
714        },
715    },
716}
717
718cc_test {
719    name: "kselftest_x86_test_sysret_ss_attrs",
720    stem: "sysret_ss_attrs",
721    relative_install_path: "linux-kselftest/x86",
722    srcs: [
723        "tools/testing/selftests/x86/sysret_ss_attrs.c",
724    ],
725    cflags: [
726        "-O2",
727        "-pthread",
728    ],
729    c_std: "gnu99",
730    static_executable: true,
731    test_per_src: false,
732    defaults: ["kselftest_defaults"],
733    enabled: false,
734    arch: {
735        x86: {
736            enabled: true,
737            srcs: [
738                "tools/testing/selftests/x86/thunks_32.S",
739            ],
740        },
741        x86_64: {
742            enabled: true,
743            srcs: [
744                "tools/testing/selftests/x86/thunks.S",
745            ],
746        },
747    },
748}
749
750cc_test {
751    name: "kselftest_x86_test_syscall_vdso",
752    stem: "test_syscall_vdso",
753    relative_install_path: "linux-kselftest/x86",
754    srcs: [
755        "tools/testing/selftests/x86/test_syscall_vdso.c",
756        "tools/testing/selftests/x86/thunks_32.S",
757    ],
758    cflags: [
759        "-O2",
760        "-pthread",
761    ],
762    c_std: "gnu99",
763    static_executable: true,
764    test_per_src: false,
765    defaults: ["kselftest_defaults"],
766    enabled: false,
767    arch: {
768        x86: {
769            enabled: true,
770        },
771    },
772}
773
774// zram tests
775sh_test {
776    name: "kselftest_zram_zram.sh",
777    sub_dir: "linux-kselftest/zram",
778    src: "tools/testing/selftests/zram/zram.sh",
779    filename_from_src: true,
780    compile_multilib: "both",
781}
782
783sh_test {
784    name: "kselftest_zram_zram01.sh",
785    sub_dir: "linux-kselftest/zram",
786    src: "tools/testing/selftests/zram/zram01.sh",
787    filename_from_src: true,
788    compile_multilib: "both",
789}
790
791sh_test {
792    name: "kselftest_zram_zram02.sh",
793    sub_dir: "linux-kselftest/zram",
794    src: "tools/testing/selftests/zram/zram02.sh",
795    filename_from_src: true,
796    compile_multilib: "both",
797}
798
799sh_test {
800    name: "kselftest_zram_zram_lib.sh",
801    sub_dir: "linux-kselftest/zram",
802    src: "tools/testing/selftests/zram/zram_lib.sh",
803    filename_from_src: true,
804    compile_multilib: "both",
805}
806