android_system_core/libion/tests/heap_query.cpp
Sandeep Patil f7f03c9e32 libion: make tests work with Ion from common kernel.
The tests do not care about legacy ION interface and are intended to
concentrate for kernels 4.14+ (new API). Running these tests
successfully during changes in ION will keep us honest with the upcoming
heap-as-module changes in ION.

Test: ./ion-unit-tests on cuttlefish.
Bug: 133508579

Change-Id: I2a31d09d09deb5be9ae84c4981cdf4b3c2cceb4c
Signed-off-by: Sandeep Patil <sspatil@google.com>
2019-07-30 14:40:24 -07:00

27 lines
882 B
C++

/*
* Copyright (C) 2019 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.
*/
#include <gtest/gtest.h>
#include "ion_test_fixture.h"
class HeapQuery : public IonTest {};
TEST_F(HeapQuery, AtleastOneHeap) {
ASSERT_GT(ion_heaps.size(), 0);
}
// TODO: Check if we expect some of the default
// heap types to be present on all devices.