From c216513a3837ff0a10463a96d04a6e938dde0897 Mon Sep 17 00:00:00 2001 From: wufan Date: Mon, 22 Aug 2022 11:43:40 +0800 Subject: [PATCH] add part of ltp syscalls testcases Signed-off-by: wufan --- test/BUILD.gn | 2 + test/kernel_ltp/BUILD.gn | 122 +++++++++++++++++ test/kernel_ltp/generate_config.sh | 65 +++++++++ test/kernel_ltp/kernel_interface_template.gni | 29 ++++ test/kernel_ltp/macrolists | 28 ++++ test/kernel_ltp/syscalls/BUILD.gn | 126 ++++++++++++++++++ test/kernel_ltp/syscalls/abort/BUILD.gn | 20 +++ test/kernel_ltp/syscalls/accept/BUILD.gn | 24 ++++ test/kernel_ltp/syscalls/accept4/BUILD.gn | 21 +++ test/kernel_ltp/syscalls/access/BUILD.gn | 35 +++++ test/kernel_ltp/syscalls/acct/BUILD.gn | 25 ++++ test/kernel_ltp/syscalls/add_key/BUILD.gn | 45 +++++++ test/kernel_ltp/syscalls/adjtimex/BUILD.gn | 33 +++++ test/kernel_ltp/syscalls/alarm/BUILD.gn | 40 ++++++ test/kernel_ltp/syscalls/bind/BUILD.gn | 45 +++++++ test/kernel_ltp/syscalls/bpf/BUILD.gn | 57 ++++++++ test/kernel_ltp/syscalls/brk/BUILD.gn | 25 ++++ test/kernel_ltp/syscalls/cacheflush/BUILD.gn | 22 +++ test/kernel_ltp/syscalls/capget/BUILD.gn | 24 ++++ test/kernel_ltp/syscalls/capset/BUILD.gn | 35 +++++ test/kernel_ltp/syscalls/chdir/BUILD.gn | 25 ++++ test/kernel_ltp/syscalls/chmod/BUILD.gn | 40 ++++++ test/kernel_ltp/syscalls/chown/BUILD.gn | 45 +++++++ test/kernel_ltp/syscalls/chroot/BUILD.gn | 35 +++++ .../syscalls/clock_adjtime/BUILD.gn | 25 ++++ .../kernel_ltp/syscalls/clock_getres/BUILD.gn | 22 +++ .../syscalls/clock_gettime/BUILD.gn | 60 +++++++++ .../syscalls/clock_nanosleep/BUILD.gn | 35 +++++ .../syscalls/clock_settime/BUILD.gn | 30 +++++ test/kernel_ltp/syscalls/clone/BUILD.gn | 60 +++++++++ test/kernel_ltp/syscalls/clone3/BUILD.gn | 25 ++++ test/kernel_ltp/syscalls/close/BUILD.gn | 25 ++++ test/kernel_ltp/syscalls/close_range/BUILD.gn | 29 ++++ test/kernel_ltp/syscalls/cma/BUILD.gn | 39 ++++++ test/kernel_ltp/syscalls/confstr/BUILD.gn | 21 +++ test/kernel_ltp/syscalls/connect/BUILD.gn | 27 ++++ .../syscalls/copy_file_range/BUILD.gn | 30 +++++ test/kernel_ltp/syscalls/creat/BUILD.gn | 61 +++++++++ 38 files changed, 1457 insertions(+) create mode 100644 test/kernel_ltp/BUILD.gn create mode 100755 test/kernel_ltp/generate_config.sh create mode 100644 test/kernel_ltp/kernel_interface_template.gni create mode 100644 test/kernel_ltp/macrolists create mode 100644 test/kernel_ltp/syscalls/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/abort/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/accept/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/accept4/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/access/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/acct/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/add_key/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/adjtimex/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/alarm/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/bind/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/bpf/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/brk/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/cacheflush/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/capget/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/capset/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/chdir/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/chmod/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/chown/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/chroot/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clock_adjtime/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clock_getres/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clock_gettime/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clock_nanosleep/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clock_settime/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clone/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/clone3/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/close/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/close_range/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/cma/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/confstr/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/connect/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/copy_file_range/BUILD.gn create mode 100644 test/kernel_ltp/syscalls/creat/BUILD.gn diff --git a/test/BUILD.gn b/test/BUILD.gn index b3051e2..2dae851 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -47,6 +47,8 @@ group("linuxkerneltest") { ":accesstokenid_test", ":init_runtest", "fuzztest:fuzztest", + + #"kernel_ltp:HatsKernelTest", ] if ("$device_name" == "rk3568") { deps += [ "tracepointtest:tracepointtest" ] diff --git a/test/kernel_ltp/BUILD.gn b/test/kernel_ltp/BUILD.gn new file mode 100644 index 0000000..609eafa --- /dev/null +++ b/test/kernel_ltp/BUILD.gn @@ -0,0 +1,122 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +ltp_source_dir = "third_party/ltp" +ltp_script_dir = "kernel/linux/build/test/kernel_ltp" + +group("HatsKernelTest") { + testonly = true + deps = [ "syscalls:HatsSyscallsTest" ] +} + +static_library("kernel_ltp_test") { + deps = [ ":generate_config" ] + include_dirs = [ + "${root_build_dir}/tests/ltp_testcases/ltp/include", + "${root_build_dir}/tests/ltp_testcases/ltp/include/old", + ] + cflags = [ "-w" ] + defines = [ + "LTPLIB", + "HAVE_ATOMIC_MEMORY_MODEL=1", + "HAVE_STRUCT_FILE_HANDLE", + ] + sources = [ + "//third_party/ltp/lib/cloner.c", + "//third_party/ltp/lib/errnos.h", + "//third_party/ltp/lib/get_path.c", + "//third_party/ltp/lib/parse_opts.c", + "//third_party/ltp/lib/random_range.c", + "//third_party/ltp/lib/safe_file_ops.c", + "//third_party/ltp/lib/safe_macros.c", + "//third_party/ltp/lib/safe_net.c", + "//third_party/ltp/lib/safe_pthread.c", + "//third_party/ltp/lib/safe_stdio.c", + "//third_party/ltp/lib/self_exec.c", + "//third_party/ltp/lib/signame.h", + "//third_party/ltp/lib/tlibio.c", + "//third_party/ltp/lib/tst_af_alg.c", + "//third_party/ltp/lib/tst_ansi_color.c", + "//third_party/ltp/lib/tst_arch.c", + "//third_party/ltp/lib/tst_assert.c", + "//third_party/ltp/lib/tst_bool_expr.c", + "//third_party/ltp/lib/tst_buffers.c", + "//third_party/ltp/lib/tst_capability.c", + "//third_party/ltp/lib/tst_cgroup.c", + "//third_party/ltp/lib/tst_checkpoint.c", + "//third_party/ltp/lib/tst_checksum.c", + "//third_party/ltp/lib/tst_clocks.c", + "//third_party/ltp/lib/tst_clone.c", + "//third_party/ltp/lib/tst_cmd.c", + "//third_party/ltp/lib/tst_coredump.c", + "//third_party/ltp/lib/tst_cpu.c", + "//third_party/ltp/lib/tst_crypto.c", + "//third_party/ltp/lib/tst_device.c", + "//third_party/ltp/lib/tst_dir_is_empty.c", + "//third_party/ltp/lib/tst_fill_file.c", + "//third_party/ltp/lib/tst_fill_fs.c", + "//third_party/ltp/lib/tst_fips.c", + "//third_party/ltp/lib/tst_fs_has_free.c", + "//third_party/ltp/lib/tst_fs_link_count.c", + "//third_party/ltp/lib/tst_fs_setup.c", + "//third_party/ltp/lib/tst_fs_type.c", + "//third_party/ltp/lib/tst_get_bad_addr.c", + "//third_party/ltp/lib/tst_hugepage.c", + "//third_party/ltp/lib/tst_ioctl.c", + "//third_party/ltp/lib/tst_kconfig.c", + "//third_party/ltp/lib/tst_kernel.c", + "//third_party/ltp/lib/tst_kvercmp.c", + "//third_party/ltp/lib/tst_lockdown.c", + "//third_party/ltp/lib/tst_memutils.c", + "//third_party/ltp/lib/tst_mkfs.c", + "//third_party/ltp/lib/tst_module.c", + "//third_party/ltp/lib/tst_net.c", + "//third_party/ltp/lib/tst_netdevice.c", + "//third_party/ltp/lib/tst_parse_opts.c", + "//third_party/ltp/lib/tst_path_has_mnt_flags.c", + "//third_party/ltp/lib/tst_pid.c", + "//third_party/ltp/lib/tst_process_state.c", + "//third_party/ltp/lib/tst_res.c", + "//third_party/ltp/lib/tst_resource.c", + "//third_party/ltp/lib/tst_rtctime.c", + "//third_party/ltp/lib/tst_rtnetlink.c", + "//third_party/ltp/lib/tst_safe_file_at.c", + "//third_party/ltp/lib/tst_safe_io_uring.c", + "//third_party/ltp/lib/tst_safe_macros.c", + "//third_party/ltp/lib/tst_safe_sysv_ipc.c", + "//third_party/ltp/lib/tst_safe_timerfd.c", + "//third_party/ltp/lib/tst_sig.c", + "//third_party/ltp/lib/tst_sig_proc.c", + "//third_party/ltp/lib/tst_status.c", + "//third_party/ltp/lib/tst_supported_fs_types.c", + "//third_party/ltp/lib/tst_sys_conf.c", + "//third_party/ltp/lib/tst_taint.c", + "//third_party/ltp/lib/tst_test.c", + "//third_party/ltp/lib/tst_timer.c", + "//third_party/ltp/lib/tst_timer_test.c", + "//third_party/ltp/lib/tst_tmpdir.c", + "//third_party/ltp/lib/tst_uid.c", + "//third_party/ltp/lib/tst_virt.c", + "//third_party/ltp/lib/tst_wallclock.c", + ] +} + +action("generate_config") { + script = "generate_config.sh" + outputs = [ "${root_build_dir}/tests/ltp_testcases/output" ] + args = [ + rebase_path("${root_build_dir}/../../${ltp_source_dir}"), + rebase_path("${root_build_dir}/../../${ltp_script_dir}"), + rebase_path("${root_build_dir}/tests/ltp_testcases"), + ] +} diff --git a/test/kernel_ltp/generate_config.sh b/test/kernel_ltp/generate_config.sh new file mode 100755 index 0000000..2aa7d8f --- /dev/null +++ b/test/kernel_ltp/generate_config.sh @@ -0,0 +1,65 @@ +#!/bin/bash +################################################################################ +# +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ +# File: generate_config.sh +# +# Description: generate config for linux test project +# +# Authors: Wu Fan +# +# History: August 4 2022 - generate config +# +################################################################################ +set -e +IFS=$'\n' +input_file=$2/macrolists +change_file=$3/ltp/include/config.h + +function chang_config() +{ + while read line; do + if [[ "${line}" == *"#"* ]]; then + continue + else + macro=$(echo $line | awk -F "'" '{print $2}') + flag=$(echo $line | awk -F "'" '{print $4}') + set +e + if [ "${flag}" == "true" ]; then + lines=$(sed -n "/${macro}/=" $change_file) + if [[ "${lines}" > 0 ]]; then + sed -i "/${macro}/c\#define ${macro} 1" $change_file + else + echo "#define ${macro} 1" >> $change_file + fi + else + sed -i "/${macro}/c\/\* \#undef ${macro} \*\/" $change_file + fi + set -e + fi + done < $input_file + echo "typedef unsigned int __u32;" >> $change_file + echo "typedef signed int __s32;" >> $change_file +} + +mkdir -p $(pwd)/tests/ltp_testcases/ltp +cp -r $(pwd)/../../third_party/ltp $(pwd)/tests/ltp_testcases +cd $(pwd)/tests/ltp_testcases/ltp +make autotools +./configure --without-numa +add_notation=./include/tst_clone.h +sed -i "/^\#define clone/c\/\/ \#define clone(...) (use_the_ltp_clone_functions__do_not_use_clone)" $add_notation +chang_config diff --git a/test/kernel_ltp/kernel_interface_template.gni b/test/kernel_ltp/kernel_interface_template.gni new file mode 100644 index 0000000..9fb2960 --- /dev/null +++ b/test/kernel_ltp/kernel_interface_template.gni @@ -0,0 +1,29 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//build/ohos.gni") + +template("kernel_interface_bin") { + executable(target_name) { + forward_variables_from(invoker, "*") + cflags = [ "-w" ] + defines = [ "HAVE_ATOMIC_MEMORY_MODEL=1" ] + if (!defined(invoker.include_dirs)) { + include_dirs = [] + } + deps = [ "//kernel/linux/build/test/kernel_ltp:kernel_ltp_test" ] + include_dirs += [ + "${root_build_dir}/tests/ltp_testcases/ltp/include", + "${root_build_dir}/tests/ltp_testcases/ltp/include/old", + ] + } +} diff --git a/test/kernel_ltp/macrolists b/test/kernel_ltp/macrolists new file mode 100644 index 0000000..26c9a90 --- /dev/null +++ b/test/kernel_ltp/macrolists @@ -0,0 +1,28 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +'HAVE_MALLINFO' 'false' +'HAVE_MALLOPT' 'false' +'HAVE_PREADV2' 'false' +'HAVE_PROFIL' 'false' +'HAVE_PWRITEV2' 'false' +'HAVE_STRUCT_FANOTIFY_EVENT_INFO_FID_FSID___VAL' 'true' +'HAVE_RENAMEAT2' 'false' +'HAVE_STATX' 'false' +'HAVE_STRUCT_LOOP_CONFIG' 'true' +'HAVE_STRUCT_STATX' 'false' +'HAVE_STRUCT_STATX_TIMESTAMP' 'false' +'HAVE_STRUCT_TERMIO' 'false' +'HAVE_ASM_LDT_H' 'false' +'HAVE_PKEY_MPROTECT' 'false' +'_LINUX_KERNEL_H' 'true' +'HAVE_STRUCT_MMSGHDR ' 'true' diff --git a/test/kernel_ltp/syscalls/BUILD.gn b/test/kernel_ltp/syscalls/BUILD.gn new file mode 100644 index 0000000..e3cb23b --- /dev/null +++ b/test/kernel_ltp/syscalls/BUILD.gn @@ -0,0 +1,126 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +group("HatsSyscallsTest") { + testonly = true + deps = [ + "abort:abort01", + "accept:accept01", + "accept:accept02", + "accept4:accept4_01", + "access:access01", + "access:access02", + "access:access03", + "access:access04", + "acct:acct01", + "acct:acct02", + "add_key:add_key01", + "add_key:add_key02", + "add_key:add_key03", + "add_key:add_key04", + "add_key:add_key05", + "adjtimex:adjtimex01", + "adjtimex:adjtimex02", + "adjtimex:adjtimex03", + "alarm:alarm02", + "alarm:alarm03", + "alarm:alarm05", + "alarm:alarm06", + "alarm:alarm07", + "bind:bind01", + "bind:bind02", + "bind:bind03", + "bind:bind04", + "bind:bind05", + "bind:bind06", + "bpf:bpf_map01", + "bpf:bpf_prog01", + "bpf:bpf_prog02", + "bpf:bpf_prog03", + "bpf:bpf_prog04", + "bpf:bpf_prog05", + "brk:brk01", + "brk:brk02", + "cacheflush:cacheflush01", + "capget:capget01", + "capget:capget02", + "capset:capset01", + "capset:capset02", + "capset:capset03", + "capset:capset04", + "chdir:chdir01", + "chdir:chdir04", + "chmod:chmod01", + "chmod:chmod03", + "chmod:chmod05", + "chmod:chmod06", + "chmod:chmod07", + "chown:chown01", + "chown:chown02", + "chown:chown03", + "chown:chown04", + "chown:chown05", + "chroot:chroot01", + "chroot:chroot02", + "chroot:chroot03", + "chroot:chroot04", + "clock_adjtime:clock_adjtime01", + "clock_adjtime:clock_adjtime02", + "clock_getres:clock_getres01", + "clock_gettime:clock_gettime01", + "clock_gettime:clock_gettime02", + "clock_gettime:clock_gettime03", + "clock_gettime:clock_gettime04", + "clock_gettime:leapsec01", + "clock_nanosleep:clock_nanosleep01", + "clock_nanosleep:clock_nanosleep02", + "clock_nanosleep:clock_nanosleep03", + "clock_nanosleep:clock_nanosleep04", + "clock_settime:clock_settime01", + "clock_settime:clock_settime02", + "clock_settime:clock_settime03", + "clone:clone01", + "clone:clone02", + "clone:clone03", + "clone:clone04", + "clone:clone05", + "clone:clone06", + "clone:clone07", + "clone:clone08", + "clone:clone09", + "clone3:clone301", + "clone3:clone302", + "close:close01", + "close:close02", + "close_range:close_range01", + "close_range:close_range02", + "cma:process_vm01", + "cma:process_vm_readv02", + "cma:process_vm_readv03", + "cma:process_vm_writev02", + "connect:connect01", + "connect:connect02", + "copy_file_range:copy_file_range01", + "copy_file_range:copy_file_range02", + "copy_file_range:copy_file_range03", + "creat:creat01", + "creat:creat03", + "creat:creat04", + "creat:creat05", + "creat:creat06", + "creat:creat07", + "creat:creat07_child", + "creat:creat08", + "creat:creat09", + ] +} diff --git a/test/kernel_ltp/syscalls/abort/BUILD.gn b/test/kernel_ltp/syscalls/abort/BUILD.gn new file mode 100644 index 0000000..7496794 --- /dev/null +++ b/test/kernel_ltp/syscalls/abort/BUILD.gn @@ -0,0 +1,20 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("abort01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/abort/abort01.c" ] +} diff --git a/test/kernel_ltp/syscalls/accept/BUILD.gn b/test/kernel_ltp/syscalls/accept/BUILD.gn new file mode 100644 index 0000000..2cc224c --- /dev/null +++ b/test/kernel_ltp/syscalls/accept/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("accept01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/accept/accept01.c" ] +} +kernel_interface_bin("accept02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/accept/accept02.c" ] +} diff --git a/test/kernel_ltp/syscalls/accept4/BUILD.gn b/test/kernel_ltp/syscalls/accept4/BUILD.gn new file mode 100644 index 0000000..7f79e7a --- /dev/null +++ b/test/kernel_ltp/syscalls/accept4/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("accept4_01") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/accept4/accept4_01.c" ] +} diff --git a/test/kernel_ltp/syscalls/access/BUILD.gn b/test/kernel_ltp/syscalls/access/BUILD.gn new file mode 100644 index 0000000..7350948 --- /dev/null +++ b/test/kernel_ltp/syscalls/access/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("access01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/access/access01.c" ] +} + +kernel_interface_bin("access02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/access/access02.c" ] +} + +kernel_interface_bin("access03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/access/access03.c" ] +} + +kernel_interface_bin("access04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/access/access04.c" ] +} diff --git a/test/kernel_ltp/syscalls/acct/BUILD.gn b/test/kernel_ltp/syscalls/acct/BUILD.gn new file mode 100644 index 0000000..e3b9794 --- /dev/null +++ b/test/kernel_ltp/syscalls/acct/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("acct01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/acct/acct01.c" ] +} + +kernel_interface_bin("acct02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/acct/acct02.c" ] +} diff --git a/test/kernel_ltp/syscalls/add_key/BUILD.gn b/test/kernel_ltp/syscalls/add_key/BUILD.gn new file mode 100644 index 0000000..c9af8d7 --- /dev/null +++ b/test/kernel_ltp/syscalls/add_key/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("add_key01") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/add_key/add_key01.c" ] +} + +kernel_interface_bin("add_key02") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/add_key/add_key02.c" ] +} + +kernel_interface_bin("add_key03") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/add_key/add_key03.c" ] +} + +kernel_interface_bin("add_key04") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/add_key/add_key04.c" ] +} + +kernel_interface_bin("add_key05") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/add_key/add_key05.c" ] +} diff --git a/test/kernel_ltp/syscalls/adjtimex/BUILD.gn b/test/kernel_ltp/syscalls/adjtimex/BUILD.gn new file mode 100644 index 0000000..97ab7bb --- /dev/null +++ b/test/kernel_ltp/syscalls/adjtimex/BUILD.gn @@ -0,0 +1,33 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("adjtimex01") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/adjtimex/adjtimex01.c" ] +} + +kernel_interface_bin("adjtimex02") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/adjtimex/adjtimex02.c" ] +} + +kernel_interface_bin("adjtimex03") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/adjtimex/adjtimex03.c" ] +} diff --git a/test/kernel_ltp/syscalls/alarm/BUILD.gn b/test/kernel_ltp/syscalls/alarm/BUILD.gn new file mode 100644 index 0000000..597e3d9 --- /dev/null +++ b/test/kernel_ltp/syscalls/alarm/BUILD.gn @@ -0,0 +1,40 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("alarm02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/alarm/alarm02.c" ] +} + +kernel_interface_bin("alarm03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/alarm/alarm03.c" ] +} + +kernel_interface_bin("alarm05") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/alarm/alarm05.c" ] +} + +kernel_interface_bin("alarm06") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/alarm/alarm06.c" ] +} + +kernel_interface_bin("alarm07") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/alarm/alarm07.c" ] +} diff --git a/test/kernel_ltp/syscalls/bind/BUILD.gn b/test/kernel_ltp/syscalls/bind/BUILD.gn new file mode 100644 index 0000000..2eac5c6 --- /dev/null +++ b/test/kernel_ltp/syscalls/bind/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("bind01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/bind/bind01.c" ] +} + +kernel_interface_bin("bind02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/bind/bind02.c" ] +} + +kernel_interface_bin("bind03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/bind/bind03.c" ] +} + +kernel_interface_bin("bind04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/bind/bind04.c" ] +} + +kernel_interface_bin("bind05") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/bind/bind05.c" ] +} + +kernel_interface_bin("bind06") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/bind/bind06.c" ] +} diff --git a/test/kernel_ltp/syscalls/bpf/BUILD.gn b/test/kernel_ltp/syscalls/bpf/BUILD.gn new file mode 100644 index 0000000..a5d653a --- /dev/null +++ b/test/kernel_ltp/syscalls/bpf/BUILD.gn @@ -0,0 +1,57 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +declare_args() { + bpf_sources = [ + "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_common.c", + "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_common.h", + ] +} +kernel_interface_bin("bpf_map01") { + output_dir = "${_output_dir}" + sources = bpf_sources + sources += [ "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_map01.c" ] +} + +kernel_interface_bin("bpf_prog01") { + output_dir = "${_output_dir}" + sources = bpf_sources + sources += [ "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_prog01.c" ] +} + +kernel_interface_bin("bpf_prog02") { + output_dir = "${_output_dir}" + sources = bpf_sources + sources += [ "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_prog02.c" ] +} + +kernel_interface_bin("bpf_prog03") { + output_dir = "${_output_dir}" + sources = bpf_sources + sources += [ "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_prog03.c" ] +} + +kernel_interface_bin("bpf_prog04") { + output_dir = "${_output_dir}" + sources = bpf_sources + sources += [ "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_prog04.c" ] +} + +kernel_interface_bin("bpf_prog05") { + output_dir = "${_output_dir}" + sources = bpf_sources + sources += [ "//third_party/ltp/testcases/kernel/syscalls/bpf/bpf_prog05.c" ] +} diff --git a/test/kernel_ltp/syscalls/brk/BUILD.gn b/test/kernel_ltp/syscalls/brk/BUILD.gn new file mode 100644 index 0000000..9f03c38 --- /dev/null +++ b/test/kernel_ltp/syscalls/brk/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("brk01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/brk/brk01.c" ] +} + +kernel_interface_bin("brk02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/brk/brk02.c" ] +} diff --git a/test/kernel_ltp/syscalls/cacheflush/BUILD.gn b/test/kernel_ltp/syscalls/cacheflush/BUILD.gn new file mode 100644 index 0000000..59a4e8b --- /dev/null +++ b/test/kernel_ltp/syscalls/cacheflush/BUILD.gn @@ -0,0 +1,22 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("cacheflush01") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/testcases/kernel/syscalls/cacheflush/cacheflush01.c", + ] +} diff --git a/test/kernel_ltp/syscalls/capget/BUILD.gn b/test/kernel_ltp/syscalls/capget/BUILD.gn new file mode 100644 index 0000000..936729f --- /dev/null +++ b/test/kernel_ltp/syscalls/capget/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("capget01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/capget/capget01.c" ] +} +kernel_interface_bin("capget02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/capget/capget02.c" ] +} diff --git a/test/kernel_ltp/syscalls/capset/BUILD.gn b/test/kernel_ltp/syscalls/capset/BUILD.gn new file mode 100644 index 0000000..8fdb1a9 --- /dev/null +++ b/test/kernel_ltp/syscalls/capset/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("capset01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/capset/capset01.c" ] +} + +kernel_interface_bin("capset02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/capset/capset02.c" ] +} + +kernel_interface_bin("capset03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/capset/capset03.c" ] +} + +kernel_interface_bin("capset04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/capset/capset04.c" ] +} diff --git a/test/kernel_ltp/syscalls/chdir/BUILD.gn b/test/kernel_ltp/syscalls/chdir/BUILD.gn new file mode 100644 index 0000000..d43f065 --- /dev/null +++ b/test/kernel_ltp/syscalls/chdir/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("chdir01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chdir/chdir01.c" ] +} + +kernel_interface_bin("chdir04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chdir/chdir04.c" ] +} diff --git a/test/kernel_ltp/syscalls/chmod/BUILD.gn b/test/kernel_ltp/syscalls/chmod/BUILD.gn new file mode 100644 index 0000000..669ee43 --- /dev/null +++ b/test/kernel_ltp/syscalls/chmod/BUILD.gn @@ -0,0 +1,40 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("chmod01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chmod/chmod01.c" ] +} + +kernel_interface_bin("chmod03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chmod/chmod03.c" ] +} + +kernel_interface_bin("chmod05") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chmod/chmod05.c" ] +} + +kernel_interface_bin("chmod06") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chmod/chmod06.c" ] +} + +kernel_interface_bin("chmod07") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chmod/chmod07.c" ] +} diff --git a/test/kernel_ltp/syscalls/chown/BUILD.gn b/test/kernel_ltp/syscalls/chown/BUILD.gn new file mode 100644 index 0000000..e31dc4b --- /dev/null +++ b/test/kernel_ltp/syscalls/chown/BUILD.gn @@ -0,0 +1,45 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("chown01") { + include_dirs = [ "//third_party/ltp/testcases/kernel/syscalls/utils" ] + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chown/chown01.c" ] +} + +kernel_interface_bin("chown02") { + include_dirs = [ "//third_party/ltp/testcases/kernel/syscalls/utils" ] + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chown/chown02.c" ] +} + +kernel_interface_bin("chown03") { + include_dirs = [ "//third_party/ltp/testcases/kernel/syscalls/utils" ] + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chown/chown03.c" ] +} + +kernel_interface_bin("chown04") { + include_dirs = [ "//third_party/ltp/testcases/kernel/syscalls/utils" ] + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chown/chown04.c" ] +} + +kernel_interface_bin("chown05") { + include_dirs = [ "//third_party/ltp/testcases/kernel/syscalls/utils" ] + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chown/chown05.c" ] +} diff --git a/test/kernel_ltp/syscalls/chroot/BUILD.gn b/test/kernel_ltp/syscalls/chroot/BUILD.gn new file mode 100644 index 0000000..cb1a670 --- /dev/null +++ b/test/kernel_ltp/syscalls/chroot/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("chroot01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chroot/chroot01.c" ] +} + +kernel_interface_bin("chroot02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chroot/chroot02.c" ] +} + +kernel_interface_bin("chroot03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chroot/chroot03.c" ] +} + +kernel_interface_bin("chroot04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/chroot/chroot04.c" ] +} diff --git a/test/kernel_ltp/syscalls/clock_adjtime/BUILD.gn b/test/kernel_ltp/syscalls/clock_adjtime/BUILD.gn new file mode 100644 index 0000000..4a6395b --- /dev/null +++ b/test/kernel_ltp/syscalls/clock_adjtime/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clock_adjtime01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_adjtime/clock_adjtime01.c" ] +} + +kernel_interface_bin("clock_adjtime02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_adjtime/clock_adjtime02.c" ] +} diff --git a/test/kernel_ltp/syscalls/clock_getres/BUILD.gn b/test/kernel_ltp/syscalls/clock_getres/BUILD.gn new file mode 100644 index 0000000..1638da6 --- /dev/null +++ b/test/kernel_ltp/syscalls/clock_getres/BUILD.gn @@ -0,0 +1,22 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clock_getres01") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/testcases/kernel/syscalls/clock_getres/clock_getres01.c", + ] +} diff --git a/test/kernel_ltp/syscalls/clock_gettime/BUILD.gn b/test/kernel_ltp/syscalls/clock_gettime/BUILD.gn new file mode 100644 index 0000000..882b15d --- /dev/null +++ b/test/kernel_ltp/syscalls/clock_gettime/BUILD.gn @@ -0,0 +1,60 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clock_gettime01") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/libs/libltpvdso/parse_vdso.c", + "//third_party/ltp/libs/libltpvdso/vdso_helpers.c", + "//third_party/ltp/testcases/kernel/syscalls/clock_gettime/clock_gettime01.c", + ] +} + +kernel_interface_bin("clock_gettime02") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/libs/libltpvdso/parse_vdso.c", + "//third_party/ltp/libs/libltpvdso/vdso_helpers.c", + "//third_party/ltp/testcases/kernel/syscalls/clock_gettime/clock_gettime02.c", + ] +} + +kernel_interface_bin("clock_gettime03") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/libs/libltpvdso/parse_vdso.c", + "//third_party/ltp/libs/libltpvdso/vdso_helpers.c", + "//third_party/ltp/testcases/kernel/syscalls/clock_gettime/clock_gettime03.c", + ] +} + +kernel_interface_bin("clock_gettime04") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/libs/libltpvdso/parse_vdso.c", + "//third_party/ltp/libs/libltpvdso/vdso_helpers.c", + "//third_party/ltp/testcases/kernel/syscalls/clock_gettime/clock_gettime04.c", + ] +} + +kernel_interface_bin("leapsec01") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/libs/libltpvdso/parse_vdso.c", + "//third_party/ltp/libs/libltpvdso/vdso_helpers.c", + "//third_party/ltp/testcases/kernel/syscalls/clock_gettime/leapsec01.c", + ] +} diff --git a/test/kernel_ltp/syscalls/clock_nanosleep/BUILD.gn b/test/kernel_ltp/syscalls/clock_nanosleep/BUILD.gn new file mode 100644 index 0000000..cb6444c --- /dev/null +++ b/test/kernel_ltp/syscalls/clock_nanosleep/BUILD.gn @@ -0,0 +1,35 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clock_nanosleep01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep01.c" ] +} + +kernel_interface_bin("clock_nanosleep02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep02.c" ] +} + +kernel_interface_bin("clock_nanosleep03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep03.c" ] +} + +kernel_interface_bin("clock_nanosleep04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_nanosleep/clock_nanosleep04.c" ] +} diff --git a/test/kernel_ltp/syscalls/clock_settime/BUILD.gn b/test/kernel_ltp/syscalls/clock_settime/BUILD.gn new file mode 100644 index 0000000..f667eeb --- /dev/null +++ b/test/kernel_ltp/syscalls/clock_settime/BUILD.gn @@ -0,0 +1,30 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clock_settime01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_settime/clock_settime01.c" ] +} + +kernel_interface_bin("clock_settime02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_settime/clock_settime02.c" ] +} + +kernel_interface_bin("clock_settime03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clock_settime/clock_settime03.c" ] +} diff --git a/test/kernel_ltp/syscalls/clone/BUILD.gn b/test/kernel_ltp/syscalls/clone/BUILD.gn new file mode 100644 index 0000000..101d710 --- /dev/null +++ b/test/kernel_ltp/syscalls/clone/BUILD.gn @@ -0,0 +1,60 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clone01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone01.c" ] +} + +kernel_interface_bin("clone02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone02.c" ] +} + +kernel_interface_bin("clone03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone03.c" ] +} + +kernel_interface_bin("clone04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone04.c" ] +} + +kernel_interface_bin("clone05") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone05.c" ] +} + +kernel_interface_bin("clone06") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone06.c" ] +} + +kernel_interface_bin("clone07") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone07.c" ] +} + +kernel_interface_bin("clone08") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone08.c" ] +} + +kernel_interface_bin("clone09") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone/clone09.c" ] +} diff --git a/test/kernel_ltp/syscalls/clone3/BUILD.gn b/test/kernel_ltp/syscalls/clone3/BUILD.gn new file mode 100644 index 0000000..af0c6e7 --- /dev/null +++ b/test/kernel_ltp/syscalls/clone3/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("clone301") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone3/clone301.c" ] +} + +kernel_interface_bin("clone302") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/clone3/clone302.c" ] +} diff --git a/test/kernel_ltp/syscalls/close/BUILD.gn b/test/kernel_ltp/syscalls/close/BUILD.gn new file mode 100644 index 0000000..779545b --- /dev/null +++ b/test/kernel_ltp/syscalls/close/BUILD.gn @@ -0,0 +1,25 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("close01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/close/close01.c" ] +} + +kernel_interface_bin("close02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/close/close02.c" ] +} diff --git a/test/kernel_ltp/syscalls/close_range/BUILD.gn b/test/kernel_ltp/syscalls/close_range/BUILD.gn new file mode 100644 index 0000000..9ee4bf9 --- /dev/null +++ b/test/kernel_ltp/syscalls/close_range/BUILD.gn @@ -0,0 +1,29 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("close_range01") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/testcases/kernel/syscalls/close_range/close_range01.c", + ] +} + +kernel_interface_bin("close_range02") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/testcases/kernel/syscalls/close_range/close_range02.c", + ] +} diff --git a/test/kernel_ltp/syscalls/cma/BUILD.gn b/test/kernel_ltp/syscalls/cma/BUILD.gn new file mode 100644 index 0000000..597e145 --- /dev/null +++ b/test/kernel_ltp/syscalls/cma/BUILD.gn @@ -0,0 +1,39 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("process_vm01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/cma/process_vm01.c" ] +} + +kernel_interface_bin("process_vm_readv02") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/cma/process_vm_readv02.c" ] +} + +kernel_interface_bin("process_vm_readv03") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/cma/process_vm_readv03.c" ] +} + +kernel_interface_bin("process_vm_writev02") { + output_dir = "${_output_dir}" + sources = [ + "//third_party/ltp/testcases/kernel/syscalls/cma/process_vm_writev02.c", + ] +} diff --git a/test/kernel_ltp/syscalls/confstr/BUILD.gn b/test/kernel_ltp/syscalls/confstr/BUILD.gn new file mode 100644 index 0000000..66cb355 --- /dev/null +++ b/test/kernel_ltp/syscalls/confstr/BUILD.gn @@ -0,0 +1,21 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("confstr01") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/confstr/confstr01.c" ] +} diff --git a/test/kernel_ltp/syscalls/connect/BUILD.gn b/test/kernel_ltp/syscalls/connect/BUILD.gn new file mode 100644 index 0000000..cf42250 --- /dev/null +++ b/test/kernel_ltp/syscalls/connect/BUILD.gn @@ -0,0 +1,27 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("connect01") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/connect/connect01.c" ] +} + +kernel_interface_bin("connect02") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/connect/connect02.c" ] +} diff --git a/test/kernel_ltp/syscalls/copy_file_range/BUILD.gn b/test/kernel_ltp/syscalls/copy_file_range/BUILD.gn new file mode 100644 index 0000000..dab6c03 --- /dev/null +++ b/test/kernel_ltp/syscalls/copy_file_range/BUILD.gn @@ -0,0 +1,30 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("copy_file_range01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c" ] +} + +kernel_interface_bin("copy_file_range02") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/copy_file_range/copy_file_range02.c" ] +} + +kernel_interface_bin("copy_file_range03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/copy_file_range/copy_file_range03.c" ] +} diff --git a/test/kernel_ltp/syscalls/creat/BUILD.gn b/test/kernel_ltp/syscalls/creat/BUILD.gn new file mode 100644 index 0000000..d3a8cd8 --- /dev/null +++ b/test/kernel_ltp/syscalls/creat/BUILD.gn @@ -0,0 +1,61 @@ +# Copyright (C) 2022 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import("//kernel/linux/build/test/kernel_ltp/kernel_interface_template.gni") + +_output_dir = "${root_out_dir}/tests/ltp_testcases/SyscallsTest" + +kernel_interface_bin("creat01") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat01.c" ] +} + +kernel_interface_bin("creat03") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat03.c" ] +} + +kernel_interface_bin("creat04") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat04.c" ] +} + +kernel_interface_bin("creat05") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat05.c" ] +} + +kernel_interface_bin("creat06") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat06.c" ] +} + +kernel_interface_bin("creat07") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat07.c" ] +} + +kernel_interface_bin("creat07_child") { + output_dir = "${_output_dir}" + sources = + [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat07_child.c" ] +} + +kernel_interface_bin("creat08") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat08.c" ] +} + +kernel_interface_bin("creat09") { + output_dir = "${_output_dir}" + sources = [ "//third_party/ltp/testcases/kernel/syscalls/creat/creat09.c" ] +} -- Gitee