public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined
Date: Thu,  3 Aug 2023 20:47:33 +0000 (GMT)	[thread overview]
Message-ID: <20230803204733.E38293857BB2@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cbf4aa422c82b895ab56ef5e9acda37947ad4184

commit cbf4aa422c82b895ab56ef5e9acda37947ad4184
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Thu Aug 3 21:16:16 2023 +0200

    tst-realpath-toolong: return "unsupported" when PATH_MAX is undefined
    
    When PATH_MAX is undefined, realpath cannot ever ENAMETOOLONG, so
    this test is unsupported.

Diff:
---
 stdlib/tst-realpath-toolong.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/stdlib/tst-realpath-toolong.c b/stdlib/tst-realpath-toolong.c
index 4388890294..a071fe7544 100644
--- a/stdlib/tst-realpath-toolong.c
+++ b/stdlib/tst-realpath-toolong.c
@@ -24,18 +24,18 @@
 #include <unistd.h>
 #include <support/check.h>
 #include <support/temp_file.h>
+#include <support/test-driver.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
 #define BASENAME "tst-realpath-toolong."
 
-#ifndef PATH_MAX
-# define PATH_MAX 1024
-#endif
-
 int
 do_test (void)
 {
+#ifndef PATH_MAX
+  return EXIT_UNSUPPORTED;
+#else
   char *base = support_create_and_chdir_toolong_temp_directory (BASENAME);
 
   char buf[PATH_MAX + 1];
@@ -48,6 +48,7 @@ do_test (void)
 
   free (base);
   return 0;
+#endif
 }
 
 #include <support/test-driver.c>

                 reply	other threads:[~2023-08-03 20:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230803204733.E38293857BB2@sourceware.org \
    --to=sthibaul@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).