Skip to contentSkip to conversation

linux-next: build failure after merge of the vfs-brauner tree

DISCUSSION Mark Brown 2 participants 5 messages Mar 13 – Mar 26

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

After merging the vfs-brauner tree, today's linux-next build (arm64 kselftest) failed like this:

CC statmount_test_ns
statmount_test_ns.c:37:19: error: static declaration of 'wait_for_pid' follows non-static declaration
37 | static inline int wait_for_pid(pid_t pid)

      |                   ^~~~~~~~~~~~
In file included from statmount_test_ns.c:17:
../utils.h:47:12: note: previous declaration of 'wait_for_pid' with type 'int(pid_t)' {aka 'int(int)'}
   47 | extern int wait_for_pid(pid_t pid);
      |            ^~~~~~~~~~~~

make[1]: *** [../../lib.mk:225: /tmp/next/arm6

Caused by commit

32f54f2bbccfd (selftests/filesystems: add tests for empty mount namespaces)

I have used the version from next-20260312 instead.

author maintainer
#1 lore raw
Quoted 9 lines · Mark Brown

Hi all,

After merging the vfs-brauner tree, today's linux-next build (arm64 kselftest) failed like this:

CC statmount_test_ns
statmount_test_ns.c:37:19: error: static declaration of 'wait_for_pid' follows non-static declaration
37 | static inline int wait_for_pid(pid_t pid)

      |                   ^~~~~~~~~~~~

This issue is still present in today's -next, the version of the vfs-brauner tree being merged is currently that from next-20260312.

#2 lore raw
Quoted 6 lines · Mark Brown
Quoted 5 lines · Mark Brown

Hi all,

After merging the vfs-brauner tree, today's linux-next build (arm64 kselftest) failed like this:

Quoted 7 lines
Quoted 4 lines

CC statmount_test_ns
statmount_test_ns.c:37:19: error: static declaration of 'wait_for_pid' follows non-static declaration
37 | static inline int wait_for_pid(pid_t pid)

      |                   ^~~~~~~~~~~~

This issue is still present in today's -next, the version of the vfs-brauner tree being merged is currently that from next-20260312.

Sorry about this. Fixed now by appended patch.

From 418d1c0cdd872493731cf1f10f16a54b38a9ef57 Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Mon, 23 Mar 2026 16:31:30 +0100
Subject: [PATCH] selftests/statmount: remove duplicate wait_for_pid()

Remove the local static wait_for_pid() definition from statmount_test_ns.c as it conflicts with the extern declaration in utils.h. The identical function is already provided by utils.c.

Fixes 32f54f2bbccf (your "add tests for empty mount namespaces")
Cc <[email protected]> # mainline only
---
 .../filesystems/statmount/statmount_test_ns.c | 25 -------------------
 1 file changed, 25 deletions(-)
tools/testing/selftests/filesystems/statmount/statmount_test_ns.c +0 -25
index 063d9de46431..e500905e4c07 100644
@@ -34,31 +34,6 @@ static void handle_result(int ret, const char *testname)
 		ksft_test_result_skip("%s\n", testname);
 }
 
-static inline int wait_for_pid(pid_t pid)
-{
-	int status, ret;
-
-again:
-	ret = waitpid(pid, &status, 0);
-	if (ret == -1) {
-		if (errno == EINTR)
-			goto again;
-
-		ksft_print_msg("waitpid returned -1, errno=%d\n", errno);
-		return -1;
-	}
-
-	if (!WIFEXITED(status)) {
-		ksft_print_msg(
-		       "waitpid !WIFEXITED, WIFSIGNALED=%d, WTERMSIG=%d\n",
-		       WIFSIGNALED(status), WTERMSIG(status));
-		return -1;
-	}
-
-	ret = WEXITSTATUS(status);
-	return ret;
-}
-
 static int get_mnt_ns_id(const char *mnt_ns, uint64_t *mnt_ns_id)
 {
 	int fd = open(mnt_ns, O_RDONLY);
Signature · 1 line
2.47.3
author maintainer
#3 lore raw
Quoted 10 lines · Christian Brauner
Quoted 2 lines · Mark Brown

This issue is still present in today's -next, the version of the vfs-brauner tree being merged is currently that from next-20260312.

Sorry about this. Fixed now by appended patch.

Remove the local static wait_for_pid() definition from statmount_test_ns.c as it conflicts with the extern declaration in utils.h. The identical function is already provided by utils.c.

Thanks, that looks like it should do it - I didn't see an update to the tree today though, did you forget to push or something?

#4 lore raw
Quoted 6 lines · Mark Brown
Quoted 4 lines · Christian Brauner
Quoted 2 lines · Mark Brown

This issue is still present in today's -next, the version of the vfs-brauner tree being merged is currently that from next-20260312.

Quoted 8 lines
Quoted 5 lines

Sorry about this. Fixed now by appended patch.

Remove the local static wait_for_pid() definition from statmount_test_ns.c as it conflicts with the extern declaration in utils.h. The identical function is already provided by utils.c.

Thanks, that looks like it should do it - I didn't see an update to the tree today though, did you forget to push or something?

The test-suite hadn't finished so I didn't want to risk it. Pushing in a bit.