app:port stressapptest to nuttx

stressapptest is a userspace test, primarily composed of threads doing memory copies
and directIO disk read/write. It allocates a large block of memory (typically 85% of
the total memory on the machine), and each thread will choose randomized blocks of
memory to copy, or to write to disk. Typically there are two threads per processor,
and two threads for each disk. Result checking is done as the test proceeds by
CRCing the data as it is copied.
https://github.com/stressapptest/stressapptest

Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
guohao15 2023-11-03 14:53:08 +08:00 committed by Xiang Xiao
parent c4d97cd8f8
commit 909ab76eae
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
config TESTING_STRESSAPPTEST
bool "stressapptest"
default n
help
stressapptest is a userspace memory and CPU stress test tool. It
exercises the memory and CPU subsystem stressing for cache misses,
TLB misses, memory allocation, memory freeing, etc. It has been
used to find hardware bugs, test operating system reliability, and
test system stability.
http://people.redhat.com/~fche/stressapptest/
if TESTING_STRESSAPPTEST
config TESTING_STRESSAPPTEST_PRIORITY
int "Priority of stressapptest process"
default 100
config TESTING_STRESSAPPTEST_STACKSIZE
int "Stack size of stressapptest process"
default 8192
endif

View File

@ -0,0 +1,23 @@
############################################################################
# apps/testing/stressapptest/Make.defs
#
# 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_STRESSAPPTEST),)
CONFIGURED_APPS += $(APPDIR)/testing/stressapptest
endif

View File

@ -0,0 +1,41 @@
############################################################################
# apps/testing/stressapptest/Makefile
#
# 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
VPATH += stressapptest
VPATH += stressapptest/src
DEPPATH += --dep-path stressapptest
DEPPATH += --dep-path stressapptest/src
CXXEXT := .cc
CXXFLAGS += -DHAVE_CONFIG_H -fpermissive
CXXSRCS += adler32memcpy.cc disk_blocks.cc error_diag.cc finelock_queue.cc logger.cc
CXXSRCS += os.cc os_factory.cc pattern.cc queue.cc sat.cc sat_factory.cc worker.cc
MAINSRC += main.cc
PROGNAME += stressapptest
PRIORITY = $(CONFIG_TESTING_STRESSAPPTEST_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_STRESSAPPTEST_STACKSIZE)
MODULE = $(CONFIG_TESTING_STRESSAPPTEST)
include $(APPDIR)/Application.mk