From c7dcf594f4c52fa7e2cc76918c8aa9abb98e9625 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 8 Nov 2024 17:08:09 +0000 Subject: Rename new tst-sem17 test to tst-sem18 As noted by Adhemerval, we already have a tst-sem17 in nptl. Tested for x86_64. --- sysdeps/pthread/Makefile | 2 +- sysdeps/pthread/tst-sem17.c | 35 ----------------------------------- sysdeps/pthread/tst-sem18.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 sysdeps/pthread/tst-sem17.c create mode 100644 sysdeps/pthread/tst-sem18.c diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 7f52e7d..1a9f255 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -256,7 +256,7 @@ tests += \ tst-sem14 \ tst-sem15 \ tst-sem16 \ - tst-sem17 \ + tst-sem18 \ tst-setuid3 \ tst-signal1 \ tst-signal2 \ diff --git a/sysdeps/pthread/tst-sem17.c b/sysdeps/pthread/tst-sem17.c deleted file mode 100644 index c3f05d1..0000000 --- a/sysdeps/pthread/tst-sem17.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Test sem_open with missing file. - Copyright (C) 2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include - -#include - -int -do_test (void) -{ - sem_unlink ("/glibc-tst-sem17"); - errno = 0; - sem_t *s = sem_open ("/glibc-tst-sem17", 0); - TEST_VERIFY (s == SEM_FAILED); - TEST_COMPARE (errno, ENOENT); - return 0; -} - -#include diff --git a/sysdeps/pthread/tst-sem18.c b/sysdeps/pthread/tst-sem18.c new file mode 100644 index 0000000..1be207b --- /dev/null +++ b/sysdeps/pthread/tst-sem18.c @@ -0,0 +1,35 @@ +/* Test sem_open with missing file. + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +#include + +int +do_test (void) +{ + sem_unlink ("/glibc-tst-sem18"); + errno = 0; + sem_t *s = sem_open ("/glibc-tst-sem18", 0); + TEST_VERIFY (s == SEM_FAILED); + TEST_COMPARE (errno, ENOENT); + return 0; +} + +#include -- cgit v1.1