Comment 2 for bug 1951404

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

With a deeper investigation on B-4.15 with P8 node "gulpin"

Regardless of my changes to how we run it, the upstream code got some issue here. There is no way to run these tests in selftests/powerpc/pmu

It has something to do with the selftests/powerpc/pmu/Makefile, in which it will override the RUN_TEST function defined in selftests/lib.mk to:

DEFAULT_RUN_TESTS := $(RUN_TESTS)
override define RUN_TESTS
    $(DEFAULT_RUN_TESTS)
    TARGET=ebb; BUILD_TARGET=$$OUTPUT/$$TARGET; $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests
endef

To my understanding, the goal of this is to keep the original RUN_TESTS function, and append an extra step to trigger the ebb test under the pmu directory.

However the $(1) variable which should pass the $TEST_GEN_PROGS is empty in this case, thus the for loop the execute these tests were skipped.

I guess there is something wrong with the $(1) expansion when it's being assigned to DEFAULT_RUN_TESTS, investigation is still WIP

.ONESHELL:
define RUN_TESTS
        @export KSFT_TAP_LEVEL=`echo 1`; \
        test_num=`echo 0`; \
        skip=`echo 4`; \
        echo "TAP version 13"; \
        for TEST in $(1); do \
                BASENAME_TEST=`basename $$TEST`; \
                test_num=`echo $$test_num+1 | bc`; \