Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2eab743f authored by Colin Cross's avatar Colin Cross Committed by Android Git Automerger
Browse files

am 0191c801: am 7fa9afed: am 3ccdf0bb: am c3e314a9: Merge changes Ie4b641cd,I5502b71d,I68086ce4

* commit '0191c801':
  libion: add apache license header to ion_test.c
  libion: initial unit tests
  libion: update ion_test.h
parents d809eace 0191c801
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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))
+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>
+3 −1
Original line number Diff line number Diff line
@@ -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 */
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ struct ion_test_rw_data {
	__u64 offset;
	__u64 size;
	int write;
	int __padding;
};

#define ION_IOC_MAGIC		'I'
+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