LSK: bL Scheduler test suite failed to run on LSK ubuntu build

Bug #1186988 reported by Naresh Kamboju on 2013-06-03
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro Stable Kernel (LSK)
In Progress
Medium
Naresh Kamboju
Linaro big.LITTLE
Confirmed
Undecided
Naresh Kamboju

Bug Description

bL Scheduler test suite is designed to run on android. This has been tested on bL MP build successfully. bL scheduler test suite failed to run on LSK ubuntu build, Investigate and fix the issues.

Changed in linaro-big-little-system:
assignee: nobody → Naresh Kamboju (naresh-kamboju)
description: updated
tags: added: bl-qa bl-ubuntu
Changed in linaro-stable-kernel:
assignee: nobody → Naresh Kamboju (naresh-kamboju)
milestone: none → 13.06
Naresh Kamboju (naresh-kamboju) wrote :

Issue found file executing scheduler test suite on ubuntu

-> testrunner not able to run any test suite, not able interprete/find results file paths
* testrunner should be modified to run test suite, such as each test case and all test cases under a test suite.

-> bashism porting required for all scheduler test suite scripts
* [: 0+1: integer expression expected and [: =: unary operator expected

-> Bad interpreter for all test scripts, which were designed to run on Android only, need to change this shell interpreter
* /system/bin/sh: bad interpreter:

-> bc command not found in busybox applet or saparate command. dc command needs to be added on to rootfs.
* bc: command not found

Test execution log:
https://pastebin.linaro.org/view/0ee905cd

Basil Eljuse (basil-eljuse) wrote :

Input w.r.t testrunner

In order to resolve the issue with all scripts using !/system/bin/sh globally replaced it with !/bin/bash

grep -rl "system/bin/sh" ./ | xargs sed -i 's,system/bin/sh,bin/bash,g'

After this change could see that test runner was executing each of the scripts.

To resolve the bc: command not found

sudo apt-get install bc

from the nano fs.

However after this stage there are all the bashism porting required failures as you have commented above.

To confirm that once the shell interpreter is sorted there is no need for any changes to test runner.

Naresh Kamboju (naresh-kamboju) wrote :

Test script interpreter have been modified to run on ubuntu.
grep -rl "system/bin/sh" ./ | xargs sed -i 's,system/bin/sh,bin/bash,g'

After this change, testrunner failed to open test result file, the reason for open syscall failed is not a valid path

chdir("./mpbasicsuite/testcases/FT0001") = 0
dup(1) = 4
open("./mpbasicsuite/testcases/FT0001/FT0001_123.res", O_RDWR|O_CREAT|O_TRUNC, 0644) = -1 ENOENT (No such file or directory)

After applying below change open passed:

diff --git a/testharness/testdriver/testrunner/test_driver.c b/testharness/testdriver/testrunner/test_driver.c
index bac6631..5bad5a4 100644
--- a/testharness/testdriver/testrunner/test_driver.c
+++ b/testharness/testdriver/testrunner/test_driver.c
@@ -119,11 +119,14 @@ int run(run_setup *setup)
          pass_threashold=DEFAULT_PASS_THRESHOLD;
       }
    }
+
+#if 0
    if( chdir(tcase_path) ) /*changing into testcase directory in order to enabl
    {
       message_report("unable to open testcase directory", FATAL_ERROR);
       exit(-1);
    }
+#endif
    saved_stdout_fd = redirect_stdout_to(result_path);
    for(i=0; i<setup->repetitions; ++i){
       if(i>0)
@@ -132,12 +135,16 @@ int run(run_setup *setup)
       if(!exit_status)
          ++passes;
    }
+
+#if 0
    revert_stdout_from(saved_stdout_fd);
    if( chdir(trunner_path) ) /* back to testrunner directory */
    {
       message_report("an unexpected error has occurred", FATAL_ERROR);
       exit(-1);
    }
+#endif
+
    free(scriptpath);
    free(trunner_path);
    free(tcase_path);

Test log:
open("./mpbasicsuite/testcases/FT0001/FT0001_123.res", O_RDWR|O_CREAT|O_TRUNC, 0644) = 4

Naresh Kamboju (naresh-kamboju) wrote :

the above fix is a kind of work around on Ubuntu. because the original source was working well on android.
Need to investigate the issue around testrunner.
Apart from testrunner, we need to investigate the ways to build and install on the Ubuntu target.

Changed in linaro-stable-kernel:
status: New → In Progress
Changed in linaro-big-little-system:
status: New → In Progress
Fathi Boudra (fboudra) on 2013-06-28
Changed in linaro-stable-kernel:
milestone: 13.06 → 13.07
tags: added: bl-mp
Fathi Boudra (fboudra) on 2013-07-27
Changed in linaro-stable-kernel:
milestone: 13.07 → 13.08
importance: Undecided → Medium
Fathi Boudra (fboudra) on 2013-09-02
Changed in linaro-stable-kernel:
milestone: 13.08 → 13.09
Fathi Boudra (fboudra) on 2013-09-30
Changed in linaro-stable-kernel:
milestone: 13.09 → 13.10
Fathi Boudra (fboudra) on 2013-10-22
Changed in linaro-stable-kernel:
milestone: 13.10 → 13.11
status: In Progress → Confirmed
Changed in linaro-big-little-system:
status: In Progress → Confirmed
Naresh Kamboju (naresh-kamboju) wrote :

As per the discussion at connect with ARM team, This task is planned for November cycle and will be handling at Linaro which by me.

I will update the bug accordingly.

Naresh Kamboju (naresh-kamboju) wrote :

ARM released latest test suite patches last week, which includes GPL and and Non-GPL structuring. It is a huge change.
I was waiting to land these patches in Linaro before I start working on Ubuntu porting. Now it is time to resume porting work.
As a plan I need to create a new ubuntu branch and work on that.

Due to these effect this activity extended to 13.12 release.

Fathi Boudra (fboudra) on 2013-12-10
Changed in linaro-stable-kernel:
milestone: 13.11 → 13.12
Fathi Boudra (fboudra) on 2014-01-09
Changed in linaro-stable-kernel:
milestone: 13.12 → 14.01
Fathi Boudra (fboudra) on 2014-02-22
Changed in linaro-stable-kernel:
milestone: 14.01 → 14.03
Fathi Boudra (fboudra) wrote :

Naresh, any updates?

Changed in linaro-stable-kernel:
milestone: 14.03 → 14.04
Naresh Kamboju (naresh-kamboju) wrote :

This work is under progress.

I have a branch which work on Ubuntu ( not a generic solution for Android and Ubuntu).
https://linaro-private.git.linaro.org/gitweb?p=people/nkambo/sched_tests.git;a=shortlog;h=refs/heads/ubuntu-next

This is the upstream (generic solution to Android and Ubuntu) branch currently I am working on. Where the test suite detects Android or Ubuntu file system at run time and test suite executes accordingly. Set patches are addressing ARM's review comments.
https://linaro-private.git.linaro.org/gitweb?p=bL_tests/sched_tests.git;a=shortlog;h=refs/heads/ubuntu-next

Fathi Boudra (fboudra) on 2014-04-07
Changed in linaro-stable-kernel:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers