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:
parent
c4d97cd8f8
commit
909ab76eae
27
testing/stressapptest/Kconfig
Normal file
27
testing/stressapptest/Kconfig
Normal 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
|
23
testing/stressapptest/Make.defs
Normal file
23
testing/stressapptest/Make.defs
Normal 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
|
41
testing/stressapptest/Makefile
Normal file
41
testing/stressapptest/Makefile
Normal 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
|
Loading…
Reference in New Issue
Block a user