From 8a1170903212ed31fd970d3c1b9fabf50868d01a Mon Sep 17 00:00:00 2001
From: Alexandre Oliva <oliva@adacore.com>
Date: Thu, 18 Apr 2024 08:01:15 -0300
Subject: [PATCH] [testsuite] [analyzer] require fork where used

Mark tests that fail due to the lack of fork, as in vxworks kernel
mode, as requiring fork.


for  gcc/testsuite/ChangeLog

	* gcc.dg/analyzer/pipe-glibc.c: Require fork.
	* gcc.dg/analyzer/pipe-manpages.c: Likewise.
---
 gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c    | 5 +++--
 gcc/testsuite/gcc.dg/analyzer/pipe-manpages.c | 2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c b/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c
index 60558a870b9d..fe38ddef3959 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pipe-glibc.c
@@ -1,6 +1,7 @@
-/* Example of pipe usage from glibc manual.  */
-
 /* { dg-skip-if "" { "avr-*-*" } } */
+/* { dg-require-fork "" } */
+
+/* Example of pipe usage from glibc manual.  */
 
 #include <sys/types.h>
 #include <unistd.h>
diff --git a/gcc/testsuite/gcc.dg/analyzer/pipe-manpages.c b/gcc/testsuite/gcc.dg/analyzer/pipe-manpages.c
index 6b9ae4d26028..ac5805fdba09 100644
--- a/gcc/testsuite/gcc.dg/analyzer/pipe-manpages.c
+++ b/gcc/testsuite/gcc.dg/analyzer/pipe-manpages.c
@@ -1,3 +1,5 @@
+/* { dg-require-fork "" } */
+
 /* Example of "pipe" from release 5.13 of the Linux man-pages project.
 
 Copyright (C) 2005, 2008, Michael Kerrisk <mtk.manpages@gmail.com>
-- 
GitLab