CodeSamples: Add check target to CodeSamples/ and count/ Makefiles
PATCH 1/2 CodeSamples: Add check target to CodeSamples/ and count/ Makefiles
Checking happens by running every program compiled from count/ without arguments and checking if any failed.
In order to do that, introduce a 'check' target in CodeSamples/count/Makefile.
Also, to allow further CodeSample testing in the future, make a global 'check' target on CodeSamples/Makefile.
--- CodeSamples/Makefile | 3 +++ CodeSamples/count/Makefile | 3 +++ 2 files changed, 6 insertions(+)
CodeSamples/Makefile +3 -0
@@ -66,5 +66,8 @@ ifneq ($(strip $(target)),) cat arch-$(target)/Makefile.arch >> Makefile.arch endif +check: + make -C count/ check + clean: rm -f Makefile.arch api.h
CodeSamples/count/Makefile +3 -0
@@ -90,5 +90,8 @@ count_stat_eventual: count_stat_eventual.c ../api.h counttorture.h count_tstat: count_tstat.c ../api.h counttorture.h $(CC) $(GCC_ARGS) $(CFLAGS) -o count_tstat count_tstat.c -lpthread +check: $(PROGS) + $(foreach prog, $(PROGS), ./$(prog);) + clean: rm -f $(PROGS)
Signature · 1 line
2.39.1
PATCH 2/2 utilities/gitlab-ci.yml: Add 'make check' on test_codesamples
Call make -C CodeSamples/ check on test_codesamples, so any runtime error can be detected by Gitlab-CI.
--- utilities/gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+)
utilities/gitlab-ci.yml +1 -0
@@ -12,6 +12,7 @@ test_codesamples: script: - make -C CodeSamples/ + - make -C CodeSamples/ check generate_pdfs: stage: build
Signature · 1 line
2.39.1
Paul E. McKenney
AppliedRe: [PATCH v1 2/2] utilities/gitlab-ci.yml: Add 'make check' on test_codesamples
Quoted 4 lines · Leonardo Bras
Call make -C CodeSamples/ check on
test_codesamples, so any runtime error can be detected by Gitlab-CI.Signed-off-by Leonardo Bras <[email protected]>
I queued and pushed all three, thank you!
Thanx, Paul
Quoted 19 lines
--- utilities/gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+)utilities/gitlab-ci.yml +1
-0@@ -12,6 +12,7 @@ test_codesamples: script: - make -C CodeSamples/ + - make -C CodeSamples/ check generate_pdfs: stage: buildSignature · 1 line
2.39.1
Re: [PATCH v1 2/2] utilities/gitlab-ci.yml: Add 'make check' on test_codesamples
Quoted 10 lines · Paul E. McKenney
Quoted 4 lines · Leonardo Bras
Call make -C CodeSamples/ check on
test_codesamples, so any runtime error can be detected by Gitlab-CI.Signed-off-by Leonardo Bras <[email protected]>I queued and pushed all three, thank you!
Thanx, Paul
Thank you Paul!
It looks like my pipeline failed with:
sched_setaffinity: Invalid argument
Which got me to look for some info:
- The Gitlab-CI instances are all single-cpu.
Which got me thinking:
- How would we be able to test code for Parallel Programming in a single cpu?
Well, I still haven't debugged all this, after I am sure this is the issue, I will reach people from Gitlab and check if is there any solution for this.
Best regards,
Leo
Quoted 19 lines
Quoted 19 lines
--- utilities/gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+)utilities/gitlab-ci.yml +1
-0@@ -12,6 +12,7 @@ test_codesamples: script: - make -C CodeSamples/ + - make -C CodeSamples/ check generate_pdfs: stage: buildSignature · 1 line
2.39.1
Re: [PATCH v1 2/2] utilities/gitlab-ci.yml: Add 'make check' on test_codesamples
On Sat, 04 Feb 2023 03:09:08 -0300, Leonardo Brás wrote:
...
Quoted 5 lines
Thank you Paul!
It looks like my pipeline failed with:
Quoted 7 lines
sched_setaffinity: Invalid argumentWhich got me to look for some info:
- The Gitlab-CI instances are all single-cpu.Which got me thinking:
- How would we be able to test code for Parallel Programming in a single cpu?
I assume you are using a runner gitlab provides. If this is the case, according to the page at gitlab:
https://docs.gitlab.com/ee/ci/runners/saas/linux_saas_runner.html
, there are three machine types you can choose.
- Small: 1 vCPU (default)
- Medium: 2 vCPUs
- Large: 4 vCPUs (not available for free subscription)
Hope this helps.
Thanks, Akira
Quoted 6 lines
Well, I still haven't debugged all this, after I am sure this is the issue, I will reach people from Gitlab and check if is there any solution for this.
Best regards,
Leo
Re: [PATCH v1 2/2] utilities/gitlab-ci.yml: Add 'make check' on test_codesamples
Quoted 22 lines · Akira Yokosawa
On Sat, 04 Feb 2023 03:09:08 -0300, Leonardo Brás wrote:
...Quoted 5 lines
Thank you Paul!
It looks like my pipeline failed with:
Quoted 7 lines
sched_setaffinity: Invalid argumentWhich got me to look for some info:
- The Gitlab-CI instances are all single-cpu.Which got me thinking:
- How would we be able to test code for Parallel Programming in a single cpu?I assume you are using a runner gitlab provides. If this is the case, according to the page at gitlab:
https://docs.gitlab.com/ee/ci/runners/saas/linux_saas_runner.html
, there are three machine types you can choose.
Quoted 7 lines
- Small: 1 vCPU (default)
- Medium: 2 vCPUs
- Large: 4 vCPUs (not available for free subscription)Hope this helps.
Thanks, Akira
Sure it helps. Thanks Akira!
I will send a patch fixing this as soon as I test it first.
Best regards,
Leo
Quoted 8 lines
Quoted 7 lines
Well, I still haven't debugged all this, after I am sure this is the issue, I will reach people from Gitlab and check if is there any solution for this.
Best regards,
Leo