All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH] syscalls: Remove getcontext01
Date: Mon, 22 Jul 2019 16:44:39 +0800	[thread overview]
Message-ID: <5D357777.9030308@cn.fujitsu.com> (raw)
In-Reply-To: <20190722083356.10142-1-pvorel@suse.cz>

Hi Petr,

gercontext is filtered for uclinux and android in syscalls/Makefile so 
we can remove it as well. :-)

Best Regards,
Xiao Yang
On 2019/07/22 16:33, Petr Vorel write:
> According to man getcontext(3) getcontext was this function from
> POSIX.1-2001 (SUSv2) removed from POSIX.1-2008 (SUSv3).
>
> Given that the test was just a smoke tests (doing nothing) and we don't
> test other functions from this family ({set,swap,make}context) remove it.
>
> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> ---
>   runtest/syscalls                              |  2 -
>   .../kernel/syscalls/getcontext/.gitignore     |  1 -
>   testcases/kernel/syscalls/getcontext/Makefile | 23 -----
>   .../kernel/syscalls/getcontext/getcontext01.c | 89 -------------------
>   4 files changed, 115 deletions(-)
>   delete mode 100644 testcases/kernel/syscalls/getcontext/.gitignore
>   delete mode 100644 testcases/kernel/syscalls/getcontext/Makefile
>   delete mode 100644 testcases/kernel/syscalls/getcontext/getcontext01.c
>
> diff --git a/runtest/syscalls b/runtest/syscalls
> index 67dfed661..432cd3ac5 100644
> --- a/runtest/syscalls
> +++ b/runtest/syscalls
> @@ -363,8 +363,6 @@ ftruncate04_64 ftruncate04_64
>   #futimesat test cases
>   futimesat01 futimesat01
>
> -getcontext01 getcontext01
> -
>   getcpu01 getcpu01
>
>   getcwd01 getcwd01
> diff --git a/testcases/kernel/syscalls/getcontext/.gitignore b/testcases/kernel/syscalls/getcontext/.gitignore
> deleted file mode 100644
> index 1e5e14e73..000000000
> --- a/testcases/kernel/syscalls/getcontext/.gitignore
> +++ /dev/null
> @@ -1 +0,0 @@
> -/getcontext01
> diff --git a/testcases/kernel/syscalls/getcontext/Makefile b/testcases/kernel/syscalls/getcontext/Makefile
> deleted file mode 100644
> index bd617d806..000000000
> --- a/testcases/kernel/syscalls/getcontext/Makefile
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -#
> -#  Copyright (c) International Business Machines  Corp., 2001
> -#
> -#  This program is free software;  you can redistribute it and/or modify
> -#  it under the terms of the GNU General Public License as published by
> -#  the Free Software Foundation; either version 2 of the License, or
> -#  (at your option) any later version.
> -#
> -#  This program is distributed in the hope that it will be useful,
> -#  but WITHOUT ANY WARRANTY;  without even the implied warranty of
> -#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
> -#  the GNU General Public License for more details.
> -#
> -#  You should have received a copy of the GNU General Public License
> -#  along with this program;  if not, write to the Free Software
> -#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
> -#
> -
> -top_srcdir		?= ../../../..
> -
> -include $(top_srcdir)/include/mk/testcases.mk
> -
> -include $(top_srcdir)/include/mk/generic_leaf_target.mk
> diff --git a/testcases/kernel/syscalls/getcontext/getcontext01.c b/testcases/kernel/syscalls/getcontext/getcontext01.c
> deleted file mode 100644
> index 48e78907f..000000000
> --- a/testcases/kernel/syscalls/getcontext/getcontext01.c
> +++ /dev/null
> @@ -1,89 +0,0 @@
> -/*
> - * Copyright (c) Wipro Technologies Ltd, 2005.  All Rights Reserved.
> - *  Author: Prashant P Yendigeri<prashant.yendigeri@wipro.com>
> - *
> - * This program is free software; you can redistribute it and/or modify it
> - * under the terms of version 2 of the GNU General Public License as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it would be useful, but
> - * WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> - *
> - * You should have received a copy of the GNU General Public License along
> - * with this program; if not, write the Free Software Foundation, Inc.,
> - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> - */
> -
> -#include<features.h>
> -
> -#include<stdio.h>
> -#include<unistd.h>
> -#include<errno.h>
> -#include<ucontext.h>
> -
> -#include "test.h"
> -
> -char *TCID = "getcontext01";
> -
> -#if !defined(__UCLIBC__)
> -
> -static void setup(void);
> -static void cleanup(void);
> -
> -int TST_TOTAL = 1;
> -
> -static void test_getcontext(void)
> -{
> -	ucontext_t ptr;
> -
> -	TEST(getcontext(&ptr));
> -
> -	if (TEST_RETURN == -1) {
> -		if (errno == ENOSYS)
> -			tst_resm(TCONF, "getcontext not implemented in libc");
> -		else
> -			tst_resm(TFAIL | TTERRNO, "getcontext failed");
> -	} else if (TEST_RETURN == 0) {
> -		tst_resm(TPASS, "getcontext passed");
> -	} else {
> -		tst_resm(TFAIL, "Unexpected return value %li", TEST_RETURN);
> -	}
> -}
> -
> -int main(int ac, char **av)
> -{
> -	int lc;
> -
> -	tst_parse_opts(ac, av, NULL, NULL);
> -
> -	setup();
> -
> -	for (lc = 0; TEST_LOOPING(lc); lc++) {
> -
> -		tst_count = 0;
> -
> -		test_getcontext();
> -	}
> -
> -	cleanup();
> -	tst_exit();
> -}
> -
> -static void setup(void)
> -{
> -	tst_sig(NOFORK, DEF_HANDLER, cleanup);
> -
> -	TEST_PAUSE;
> -}
> -
> -static void cleanup(void)
> -{
> -}
> -
> -#else /* systems that dont support obsolete getcontext */
> -int main(void)
> -{
> -	tst_brkm(TCONF, NULL, "system doesn't have getcontext support");
> -}
> -#endif




  reply	other threads:[~2019-07-22  8:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22  8:33 [LTP] [RFC PATCH] syscalls: Remove getcontext01 Petr Vorel
2019-07-22  8:44 ` Xiao Yang [this message]
2019-07-22  9:18   ` Petr Vorel
2019-07-22  8:52 ` Cyril Hrubis
2019-07-22  9:14   ` Petr Vorel
2019-07-22  9:18     ` Cyril Hrubis
2019-07-22  9:25       ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D357777.9030308@cn.fujitsu.com \
    --to=yangx.jy@cn.fujitsu.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.