[Fuego] new check-dependencies program (was RE: [PATCH 06/12] skip some cases because ONFIG_XFRM_USER is not set)

Bird, Tim Tim.Bird at sony.com
Fri Sep 25 23:28:22 UTC 2020


Tingting,

I have checked into the master branch some changes to do bulk dependency processing
for LTP.  Please see commit 58dc197

There is a new script called check-dependencies in fuego-core/scripts
This script is called by Functional.LTP/fuego_test.sh to process the
bulk dependency listings in Functional.LTP/test-dependency-list.txt

Please try this out and let me know what you think.

I am already aware of a few issues that need to be resolved, but this should
work for now.

Here are some issues:
 * duplicate loading of $LOGDIR/kconfig
 * should existing config and command dependencies be added to the file?
 * if check-dependencies is run more than once, it overwrites the reasons.json file
 * not sure what to when a configuration dependency is =y, and the
    board config file has =m

Should check-dependencies run a command to see if the required module is loaded and running?

Let me know if this works for you. 
 -- Tim

Here's the patch, for a quick review: (the bulk of check-dependencies was committed previously)

commit 58dc1974bf54e183807954d834d89bcf97dc107a
Author: Tim Bird <tim.bird at sony.com>
Date:   Fri Sep 25 17:00:03 2020 -0600

    LTP: use check-dependencies program for faster operation
    
    We are getting so many dependencies for LTP that the processing
    is taking a long time.  Change the code to put some config
    and command dependencies in a file, and use an external
    python program to process them in bulk.
    
    Provide the first test-dependency-list.txt file as data.
    Use the check-dependency program in LTP's fuego_test.sh
    Remove debug output from check-dependency program.
    
    The test-dependency-list was provided by:
    qiutt <qiutt at cn.fujitsu.com>
    
    Signed-off-by: Tim Bird <tim.bird at sony.com>

diff --git a/scripts/check-dependencies b/scripts/check-dependencies
index b424312..72a5f31 100755
--- a/scripts/check-dependencies
+++ b/scripts/check-dependencies
@@ -44,7 +44,7 @@ def read_config(config_filepath):
 
     config = {}
     for line in config_lines:
-        print line
+        # print line
         line = line.rstrip()
         if not line:
             continue
@@ -57,7 +57,6 @@ def read_config(config_filepath):
             name, value = line.split(" is ", 1)
             config[name[2:]] = "n"
 
-    print('config["CONFIG_USB"] = %s' % config["CONFIG_USB"])
     return config
 
 # check whether an individual dependency failed or not
@@ -70,7 +69,7 @@ def read_config(config_filepath):
 # testcase_name4: CONFIG_FOO=y CONFIG_FOO2=y
 
 def check_config_dependency(reasons, config, testcase, conf_item):
-    pr_err("checking dependency (%s:%s)" % (testcase, conf_item))
+    # pr_err("checking dependency (%s:%s)" % (testcase, conf_item))
     if "=" in conf_item:
         conf_name, needed_value = conf_item.split("=",1)
         board_value = config.get(conf_name, "n")
@@ -217,7 +216,8 @@ def main():
                 reason = "Board does not have required command: %s" % dep
                 reasons.setdefault(testcase, []).append(reason)
 
-    # print out the testcases to skip
+    # print the testcases skipped
+    # this is the main output from the program
     testcases_to_skip = reasons.keys()
     testcases_to_skip.sort()
     for testcase in testcases_to_skip:
diff --git a/tests/Functional.LTP/fuego_test.sh b/tests/Functional.LTP/fuego_test.sh
index e7de774..f3fe211 100755
--- a/tests/Functional.LTP/fuego_test.sh
+++ b/tests/Functional.LTP/fuego_test.sh
@@ -300,6 +300,19 @@ function test_pre_check {
     if [ "$ARCHITECTURE" != "i386" ]; then
         skip_tests "modify_ldt01 modify_ldt02 modify_ldt03" # Only work on i386
     fi
+
+    # now process skips from a file
+    get_full_kconfig $LOGDIR
+    # kconfig filename will be $LOGDIR/kconfig
+
+    # put reason.json file in log directory also
+    SKIPFILE=$LOGDIR/skiplist.txt
+    echo "Performing bulk dependency checking using $TEST_HOME/test-dependency-list.txt"
+    $FUEGO_CORE/scripts/check-dependencies -b $NODE_NAME \
+        -r $LOGDIR/reasons.json \
+        $LOGDIR/kconfig \
+        $TEST_HOME/test-dependency-list.txt \
+          >>$SKIPFILE
 }
 
 function test_build {
diff --git a/tests/Functional.LTP/test-dependency-list.txt b/tests/Functional.LTP/test-dependency-list.txt
new file mode 100644
index 0000000..02c0bb6
--- /dev/null
+++ b/tests/Functional.LTP/test-dependency-list.txt
@@ -0,0 +1,722 @@
+######################
+# this file has dependencies for LTP test programs
+# A dependency can be a config dependency or a command dependency
+#  * A config dependency starts with CONFIG_
+#  * a command dependency start with cmd_
+#
+# This file is meant to be processed by the Fuego program
+# check-dependencies
+#
+
+#######################
+# Config dependencies
+#######################
+
+# for net_stress.ipsec_dccp
+dccp4_ipsec02: CONFIG_XFRM_USER=y CONFIG_INET_AH=y
+dccp4_ipsec03: CONFIG_XFRM_USER=y CONFIG_INET_AH=y
[rest omitted...]


More information about the Fuego mailing list