diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2014-10-24 20:26:24 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2014-10-24 20:35:58 +0800 |
commit | a38def7e8f366ba3e045b4c3a019a86d3e1a598d (patch) | |
tree | 363e35937145775226a736d26b5b7c1b8adde6fe | |
parent | f1f4e33471a1b4e481cf443ff463bcd3c71b88be (diff) | |
download | extras-a38def7e8f366ba3e045b4c3a019a86d3e1a598d.tar.gz |
bionic libs test: clean up for gethostname test
since the tests for gethostname will be migrated into
bionic/tests/unistd_test.cpp as unistd.gethostname test
in the gtest format, the related files and settings will
be cleaned up here.
Change-Id: Ibe2bc9d3304ec9ac08a24a318276f07b84a1afea
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rw-r--r-- | tests/bionic/libc/Android.mk | 1 | ||||
-rw-r--r-- | tests/bionic/libc/common/test_gethostname.c | 47 |
2 files changed, 0 insertions, 48 deletions
diff --git a/tests/bionic/libc/Android.mk b/tests/bionic/libc/Android.mk index e51b107b..73ef8338 100644 --- a/tests/bionic/libc/Android.mk +++ b/tests/bionic/libc/Android.mk @@ -61,7 +61,6 @@ endef # First, the tests in 'common' sources := \ - common/test_gethostname.c \ common/test_pthread_mutex.c \ common/test_pthread_rwlock.c \ common/test_pthread_once.c \ diff --git a/tests/bionic/libc/common/test_gethostname.c b/tests/bionic/libc/common/test_gethostname.c deleted file mode 100644 index 96ca4e32..00000000 --- a/tests/bionic/libc/common/test_gethostname.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include <unistd.h> -#include <errno.h> -#include <string.h> -#include <stdio.h> -#include <sys/types.h> - -int main( void ) -{ - char hostname[512]; - int ret; - - ret = gethostname(hostname, sizeof(hostname)); - if (ret < 0) { - printf("gethostname() returned error %d: %s\n", errno, strerror(errno)); - return 1; - } - - printf("gethostname() returned '%s'\n", hostname); - return 0; -} |