Loading libion/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,5 @@ LOCAL_MODULE_TAGS := optional tests LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_EXECUTABLE) include $(call first-makefiles-under,$(LOCAL_PATH)) libion/ion_test.c +16 −0 Original line number Diff line number Diff line /* * Copyright 2013 Google, Inc * * 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. */ #include <errno.h> #include <fcntl.h> #include <getopt.h> Loading libion/kernel-headers/linux/ion_test.h +3 −1 Original line number Diff line number Diff line Loading @@ -27,10 +27,12 @@ struct ion_test_rw_data { __u64 size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ int write; int __padding; }; #define ION_IOC_MAGIC 'I' #define ION_IOC_TEST_SET_FD _IO(ION_IOC_MAGIC, 0xf0) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define ION_IOC_TEST_SET_FD _IO(ION_IOC_MAGIC, 0xf0) #define ION_IOC_TEST_DMA_MAPPING _IOW(ION_IOC_MAGIC, 0xf1, struct ion_test_rw_data) #define ION_IOC_TEST_KERNEL_MAPPING _IOW(ION_IOC_MAGIC, 0xf2, struct ion_test_rw_data) #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ libion/original-kernel-headers/linux/ion_test.h +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ struct ion_test_rw_data { __u64 offset; __u64 size; int write; int __padding; }; #define ION_IOC_MAGIC 'I' Loading libion/tests/Android.mk 0 → 100644 +34 −0 Original line number Diff line number Diff line # # Copyright (C) 2013 The Android Open Source Project # # 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. # LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ion-unit-tests LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_CFLAGS += -g -Wall -Werror -std=gnu++11 -Wno-missing-field-initializers LOCAL_SHARED_LIBRARIES += libion LOCAL_STATIC_LIBRARIES += libgtest_main LOCAL_C_INCLUDES := $(LOCAL_PATH)/../kernel-headers LOCAL_SRC_FILES := \ ion_test_fixture.cpp \ allocate_test.cpp \ formerly_valid_handle_test.cpp \ invalid_values_test.cpp \ map_test.cpp \ device_test.cpp \ exit_test.cpp include $(BUILD_NATIVE_TEST) Loading
libion/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -16,3 +16,5 @@ LOCAL_MODULE_TAGS := optional tests LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/kernel-headers LOCAL_SHARED_LIBRARIES := liblog include $(BUILD_EXECUTABLE) include $(call first-makefiles-under,$(LOCAL_PATH))
libion/ion_test.c +16 −0 Original line number Diff line number Diff line /* * Copyright 2013 Google, Inc * * 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. */ #include <errno.h> #include <fcntl.h> #include <getopt.h> Loading
libion/kernel-headers/linux/ion_test.h +3 −1 Original line number Diff line number Diff line Loading @@ -27,10 +27,12 @@ struct ion_test_rw_data { __u64 size; /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ int write; int __padding; }; #define ION_IOC_MAGIC 'I' #define ION_IOC_TEST_SET_FD _IO(ION_IOC_MAGIC, 0xf0) /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ #define ION_IOC_TEST_SET_FD _IO(ION_IOC_MAGIC, 0xf0) #define ION_IOC_TEST_DMA_MAPPING _IOW(ION_IOC_MAGIC, 0xf1, struct ion_test_rw_data) #define ION_IOC_TEST_KERNEL_MAPPING _IOW(ION_IOC_MAGIC, 0xf2, struct ion_test_rw_data) #endif /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
libion/original-kernel-headers/linux/ion_test.h +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ struct ion_test_rw_data { __u64 offset; __u64 size; int write; int __padding; }; #define ION_IOC_MAGIC 'I' Loading
libion/tests/Android.mk 0 → 100644 +34 −0 Original line number Diff line number Diff line # # Copyright (C) 2013 The Android Open Source Project # # 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. # LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ion-unit-tests LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk LOCAL_CFLAGS += -g -Wall -Werror -std=gnu++11 -Wno-missing-field-initializers LOCAL_SHARED_LIBRARIES += libion LOCAL_STATIC_LIBRARIES += libgtest_main LOCAL_C_INCLUDES := $(LOCAL_PATH)/../kernel-headers LOCAL_SRC_FILES := \ ion_test_fixture.cpp \ allocate_test.cpp \ formerly_valid_handle_test.cpp \ invalid_values_test.cpp \ map_test.cpp \ device_test.cpp \ exit_test.cpp include $(BUILD_NATIVE_TEST)