-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: port test/test-api.c #3
base: staging
Are you sure you want to change the base?
Conversation
@hchandad Hi, I tried testing this pr and got a seg fault on this line, the parameter Did you run into this problem before or have any idea why this might be? I will leave the extended backtrace below if it helps.
|
@StefanJum the above segv occurs when not choosing mimalloc as the default allocator in the boot section. From
Thank you for the detailed info and apologies for not including testing steps, here is what i did: ExpandChanges to app-helloworld Makefile diff --git a/Makefile b/Makefile
index 5426bae..5310f8a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
UK_ROOT ?= $(PWD)/../../unikraft
UK_LIBS ?= $(PWD)/../../libs
-LIBS :=
+LIBS := $(UK_LIBS)/lib-pthread-embedded:$(UK_LIBS)/lib-newlib:$(UK_LIBS)/lib-mimalloc
all:
@$(MAKE) -C $(UK_ROOT) A=$(PWD) L=$(LIBS) from the menuconfig i set:
I only ported test-api.c, test-stress.c does fail for me when running as app-helloworld entrypoint -without porting it- ( i still haven't figured out how to do backtraces) |
@StefanJum actually it is a change to the original sources, but i added it as a separate file, to make it possible to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @hchandad thank you!
I left an initial round of review.
Besides the comments, can you please also run checkpatch
on your patch? It looks like there are a few spacing issues.
Also please squash your commits, we ideally want only one commit with a relevant message (see here).
@StefanJum I made changes to the coding style, using checkpatch.pl output:
|
@hchandad you can ignore the errors coming from the original file, just make sure your changes do not produce any more errors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hchandad just few minor changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realised I forgot to add a comment to the previous review, sorry :)
@StefanJum Thank you, I have updated with the following changes: diff --git a/Config.uk b/Config.uk
index eb3e7a1..05e2c73 100644
--- a/Config.uk
+++ b/Config.uk
@@ -22,13 +22,12 @@ if LIBMIMALLOC
Config LIBMIMALLOC_TES
bool "Enable libmimalloc tests"
select LIBUKTEST
- select LIBMIMALLOC_TEST_API
default n
help
Enables all libmimalloc tests.
if LIBMIMALLOC_TEST
config LIBMIMALLOC_TEST_API
bool "Enable libmimalloc api test suite"
- default n
+ default y
endif endif
diff --git a/Makefile.uk b/Makefile.uk
index f9df74f..0e9fc37 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -97,6 +97,6 @@ LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/src/init.c
################################################################################
# Tests
################################################################################
-ifneq ($(filter y, $(CONFIG_LIBMIMALLOC_TEST) $(CONFIG_LIBUKTEST_ALL)),)
+ifneq ($(filter y, $(CONFIG_LIBMIMALLOC_TEST_API) $(CONFIG_LIBUKTEST_ALL)),)
LIBMIMALLOC_SRCS-y += $(LIBMIMALLOC)/test/test-api.c
endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hchandad, one last round of review, then I will approve this.
Also, the commit was messed up somewhere, is shows
hchandad authored and Ubuntu committed
.
Please also fix that.
Signed-off-by: Hamza Chandad <hchandad@proton.me>
@StefanJum fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related issue : #2
Tested with app-helloworld and 05-app-googletest on plat: kvm-x86_64
Signed-off-by: Hamza Chandad hchandad@proton.me