Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions testing/sched/waitstop/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ##############################################################################
# apps/testing/sched/waitstop/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

if(CONFIG_TESTING_WAITSTOP)

set(SRCS waitstop_main.c)

nuttx_add_application(
NAME
waitstop
PRIORITY
${CONFIG_TESTING_WAITSTOP_PRIORITY}
STACKSIZE
${CONFIG_TESTING_WAITSTOP_STACKSIZE}
MODULE
${CONFIG_TESTING_WAITSTOP}
COMPILE_FLAGS
${FLAGS}
SRCS
${SRCS})

endif()
29 changes: 29 additions & 0 deletions testing/sched/waitstop/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#

config TESTING_WAITSTOP
tristate "Stopped and continued children test"
default n
depends on SCHED_CHILD_STATUS && SCHED_WAITPID && SIG_SIGSTOP_ACTION
depends on ENABLE_ALL_SIGNALS && LIBC_EXECFUNCS && !DISABLE_POSIX_TIMERS
---help---
Test that a parent sees the stop and the continue of a child:
SIGCHLD with CLD_STOPPED and CLD_CONTINUED, SA_NOCLDSTOP and
SA_NOCLDWAIT, waitpid() with WUNTRACED and WCONTINUED, waitid()
with WSTOPPED, WCONTINUED and WNOWAIT, waitpid() of a process
group, and SIGKILL to a stopped child. The children are started
with posix_spawn(), so the test runs without fork().

if TESTING_WAITSTOP

config TESTING_WAITSTOP_PRIORITY
int "Task priority"
default 100

config TESTING_WAITSTOP_STACKSIZE
int "Stack size"
default DEFAULT_TASK_STACKSIZE

endif
25 changes: 25 additions & 0 deletions testing/sched/waitstop/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/testing/sched/waitstop/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_TESTING_WAITSTOP),)
CONFIGURED_APPS += $(APPDIR)/testing/sched/waitstop
endif
32 changes: 32 additions & 0 deletions testing/sched/waitstop/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
############################################################################
# apps/testing/sched/waitstop/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

PROGNAME = waitstop
PRIORITY = $(CONFIG_TESTING_WAITSTOP_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_WAITSTOP_STACKSIZE)
MODULE = $(CONFIG_TESTING_WAITSTOP)

MAINSRC = waitstop_main.c

include $(APPDIR)/Application.mk
Loading
Loading