An implementation of Unix dc and POSIX bc with GNU and BSD extensions
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
4.2 KiB

Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
#
# Copyright 2018 Gavin D. Howard
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
SRC = $(sort $(wildcard src/*.c))
OBJ = $(SRC:.c=.o)
BC_SRC = $(sort $(wildcard src/bc/*.c))
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
BC_OBJ = $(BC_SRC:.c=.o)
DC_SRC = $(sort $(wildcard src/dc/*.c))
DC_OBJ = $(DC_SRC:.c=.o)
GEN_DIR = gen
GEN_EXEC = strgen
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
BC_LIB = $(GEN_DIR)/lib.bc
BC_LIB_C = $(GEN_DIR)/lib.c
BC_LIB_O = $(GEN_DIR)/lib.o
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
4 years ago
BC_HELP = $(GEN_DIR)/bc_help.txt
BC_HELP_C = $(GEN_DIR)/bc_help.c
BC_HELP_O = $(GEN_DIR)/bc_help.o
DC_HELP = $(GEN_DIR)/dc_help.txt
DC_HELP_C = $(GEN_DIR)/dc_help.c
DC_HELP_O = $(GEN_DIR)/dc_help.o
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
BC_EXEC = bc
DC_EXEC = dc
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
PREFIX ?= /usr/local
INSTALL = ./install.sh
-include config.mak
CFLAGS += -Wall -Wextra -pedantic -std=c99 -funsigned-char
CPPFLAGS += -I./include/ -D_POSIX_C_SOURCE=200809L
LDLIBS += -lm
HOSTCC ?= $(CC)
all: CPPFLAGS += -DDC_CONFIG -DBC_CONFIG
all: clean $(DC_HELP_O) $(BC_HELP_O) $(BC_LIB_O) $(BC_OBJ) $(DC_OBJ) $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(DC_OBJ) $(BC_OBJ) $(BC_LIB_O) $(BC_HELP_O) $(DC_HELP_O) \
$(LDLIBS) $(LDFLAGS) -o $(BC_EXEC)
ln -s ./$(BC_EXEC) $(DC_EXEC)
$(GEN_EXEC):
$(HOSTCC) -o $(GEN_EXEC) $(GEN_DIR)/$(GEN_EXEC).c
$(BC_LIB_C): $(GEN_EXEC)
$(GEN_EMU) ./$(GEN_EXEC) $(BC_LIB) $(BC_LIB_C) bc_lib bc_lib_name
$(BC_HELP_C): $(GEN_EXEC)
$(GEN_EMU) ./$(GEN_EXEC) $(BC_HELP) $(BC_HELP_C) bc_help
$(DC_HELP_C): $(GEN_EXEC)
$(GEN_EMU) ./$(GEN_EXEC) $(DC_HELP) $(DC_HELP_C) dc_help
$(DC_EXEC): CPPFLAGS += -DDC_CONFIG
$(DC_EXEC): clean $(DC_OBJ) $(DC_HELP_O) $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(DC_OBJ) $(DC_HELP_O) $(LDLIBS) $(LDFLAGS) -o $(DC_EXEC)
$(BC_EXEC): CPPFLAGS += -DBC_CONFIG
$(BC_EXEC): clean $(BC_OBJ) $(BC_LIB_O) $(BC_HELP_O) $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(BC_OBJ) $(BC_LIB_O) $(BC_HELP_O) $(LDLIBS) $(LDFLAGS) -o $(BC_EXEC)
main: clean $(BC_OBJ) $(BC_LIB_O) $(BC_HELP_O)
$(CC) $(CFLAGS) $(BC_OBJ) $(BC_LIB_O) $(BC_HELP_O) $(LDLIBS) $(LDFLAGS)
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
help:
@echo "available targets:"
@echo ""
@echo " all build bc (uses config.mak if there is one)"
@echo " clean remove all build files"
@echo " install install to $(PREFIX)/bin"
@echo " uninstall uninstall from $(PREFIX)/bin"
@echo " test runs the test suite"
@echo " timeconst runs the test on the Linux timeconst.bc script"
@echo " the timeconst.bc script must be in the parent directory"
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
@echo ""
@echo "useful environment variables:"
@echo ""
@echo " CC C compiler"
@echo " HOSTCC Host C compiler"
@echo " CFLAGS C compiler flags"
@echo " CPPFLAGS C preprocessor flags"
@echo " LDLIBS Libraries to link to"
@echo " PREFIX the prefix to install to"
@echo " if PREFIX is \"/usr\", $(BC_EXEC) will be installed to \"/usr/bin\""
@echo " GEN_EMU Emulator to run $(GEN_EXEC) under (leave empty if not necessary)"
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
test:
tests/all.sh
valgrind:
tests/all.sh valgrind --leak-check=full --show-leak-kinds=all ./bc
timeconst:
tests/timeconst.sh
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
clean:
$(RM) -f $(OBJ)
$(RM) -f $(BC_OBJ)
$(RM) -f $(DC_OBJ)
$(RM) -f $(BC_EXEC)
$(RM) -f $(DC_EXEC)
$(RM) -f $(GEN_EXEC)
$(RM) -f $(BC_LIB_C)
$(RM) -f $(BC_LIB_O)
$(RM) -f $(BC_HELP_C)
$(RM) -f $(BC_HELP_O)
clean_tests: clean
$(RM) -f tests/parse.txt tests/parse_results.txt
$(RM) -f tests/print.txt tests/print_results.txt
$(RM) -f tests/bessel.txt tests/bessel_results.txt
$(RM) -f .log_test.txt .log_bc.txt
$(RM) -f .math.txt .results.txt .ops.txt
$(RM) -f .test.txt
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
install: uninstall
$(INSTALL) $(DESTDIR)$(PREFIX)/bin $(BC_EXEC) $(DC_EXEC)
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
uninstall:
$(RM) -f $(DESTDIR)$(PREFIX)/bin/$(BC_EXEC)
$(RM) -f $(DESTDIR)$(PREFIX)/bin/$(DC_EXEC)
Add Makefile after wiping Chris Graff's code from this repo's history Why did I wipe someone from my history? I never used any of Graff's code in my bc. It existed alongside my code because he asked me to write a parser and virtual machine that would turn a math library he wrote into a `bc' that would (possibly) be added to toybox. I agreed and got to work. That was early January 2018. Over time, disagreements mounted. I was quickly becoming frustrated. I did want to get something into toybox, but I didn't know how to write arbitrary-precision math. However, in mid to late January, I decided, for kicks, to try to write one from scratch. After two weeks, I had a *very* basic, but complete, implementation. Graff still hadn't finished his, so I made the obvious decision to use my own. Knowing Graff's habit of getting angry easily, I kept that fact secret until I had finished the `bc' and presented it to toybox's maintainer. He did get mad, but eventually (no thanks to my failure to communicate properly with toybox's maintainer), my `bc' was accepted. Graff showed up two or three weeks later, under the name "Sasha Toltec", writing to the toybox mailing list that the `bc' was garbage and that I had stolen it from Graff. Thankfully, he was found out, and disaster was averted. To remove any basis for his claim that I stole his work, I am wiping my repository clean of his code. I am keeping a copy of the repo as it was before "Sasha" arrived, just in case Graff decides to claim that I did this illegally or unethically. The original history still shows otherwise. If you would like the repo with the original history, please email me at yzena DOT tech AT gmail DOT com.
4 years ago
.PHONY: all help clean clean_tests install uninstall test