public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] Test suite for the t-core kernel patch
@ 2013-06-04 22:17 C Nandi
  2013-06-06 12:15 ` chrubis
  0 siblings, 1 reply; 4+ messages in thread
From: C Nandi @ 2013-06-04 22:17 UTC (permalink / raw)
  To: ltp-list

Hi,

Is this test suite for t-core kernel patch still valid?
If yes, can we avoid invoking following function, and go with the following patch? I believe "/proc/sys/kernel/core_dumps_threads" file will not get created by latest kernel.

File: testcases/misc/tcore_patch_test_suites/tcore.sh

check_install()
{
        if [ -f /proc/sys/kernel/core_dumps_threads ];then
                pass=`expr $pass + 1`
                return 0
        else
                fail=`expr $fail + 1`
                return 1
        fi
}

=========



diff -urN org/tcore.exp mod/tcore.exp
--- org/tcore.exp       2013-05-17 15:08:09.000000000 -0600
+++ mod/tcore.exp       2013-05-17 14:07:37.000000000 -0600
@@ -39,7 +39,7 @@
     set istrue 0
     send "info threads\n"
     expect {
-               -re " \[0-9\]+ process .*(gdb)" {
+               -re " \[0-9\]+ Thread .*(gdb)" {
        set buf $expect_out(0,string)
        }
        timeout {
@@ -47,7 +47,7 @@
                return 1
        }
     }
-    set curr_thread [check_buf $buf "process"]
+    set curr_thread [check_buf $buf "Thread"]
     if { $curr_thread == 0 } {
        send_user "check_threads (no current thread)\n"
        return 1
@@ -76,7 +76,7 @@
                                  return 1
                         }
                 }
-                set number1 [check_buf $buf "(process"]
+                set number1 [check_buf $buf "(Thread"]
                 send "bt\n"
                 expect {
                         -re  " bt.*#\[0-9\]+ .*(gdb)" {
@@ -101,13 +101,13 @@
 }

 proc check_fpu {num} {
+       exp_internal 1
        global expect_out
        global pass
-       send "\n"
-       send "info register\n"
-       send "\n"
+       send "set pagination off\n"
+       send "info all-register\n"
        expect {
-               -re "xmm$num\[\t \]+\{f \= .*\}+\[\t \]+\{f \= .*\}" {
+               -re "xmm$num\[\t \]+\{.*f.* \= .*\}" {
                        set buf $expect_out(0,string)
                }
                timeout {
@@ -130,8 +130,8 @@
        }
 }
 set GDB gdb
-set binfile ./tcore
-set corefile  ./corefile
+set binfile  [lindex $argv 0]
+set corefile [lindex $argv 1]

 spawn $GDB ${binfile} ${corefile}
 check_fpu 5
diff -urN org/tcore.sh mod/tcore.sh
--- org/tcore.sh        2013-05-17 15:08:09.000000000 -0600
+++ mod/tcore.sh        2013-05-17 14:08:05.000000000 -0600
@@ -125,19 +125,22 @@
        prepare_gdb
        mv -f $TEST_DIR/core.* $TEST_DIR/corefile >/dev/null 2>&1
        echo "Test whether the core support bt,fpu and threads commands "
-       expect $BIN_DIR/tcore.exp
+       expect $BIN_DIR/tcore.exp $BIN_DIR/tcore $TEST_DIR/corefile
        return=$?
        pass=`expr $pass + $return`
+echo $pass,$return,$fail
        fail=`expr 3 - $return + $fail`
 }

 echo "Test Tcore patch "
-check_install
+# Avoid check for /proc/sys/kernel/core_dumps_threads
+# This is not supported by latest kernels
+#check_install
 Test_gen_core
 Test_core_file
 echo "Linux Tcore test results" > results
 echo "Total pass fail" >>  results
-echo "  5      $pass   $fail" >> results
+echo "  4      $pass   $fail" >> results
 cleanup $fail


Thanks,
Nandi


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] Test suite for the t-core kernel patch
  2013-06-04 22:17 C Nandi
@ 2013-06-06 12:15 ` chrubis
  0 siblings, 0 replies; 4+ messages in thread
From: chrubis @ 2013-06-06 12:15 UTC (permalink / raw)
  To: C Nandi; +Cc: ltp-list

Hi!
> Is this test suite for t-core kernel patch still valid?
> If yes, can we avoid invoking following function, and go with the following patch? I believe "/proc/sys/kernel/core_dumps_threads" file will not get created by latest kernel.
> 
> File: testcases/misc/tcore_patch_test_suites/tcore.sh
> 
> check_install()
> {
>         if [ -f /proc/sys/kernel/core_dumps_threads ];then
>                 pass=`expr $pass + 1`
>                 return 0
>         else
>                 fail=`expr $fail + 1`
>                 return 1
>         fi
> }
> 
> =========
> 

I did a little bit of archeology and it seems that patch which
introduced this file never got accepted into mainline linux kernel.
(Found some discussion about it around linux 2.4 and 2.5 development.)

So it looks like this test was never working.

> 
> diff -urN org/tcore.exp mod/tcore.exp
> --- org/tcore.exp       2013-05-17 15:08:09.000000000 -0600
> +++ mod/tcore.exp       2013-05-17 14:07:37.000000000 -0600
> @@ -39,7 +39,7 @@
>      set istrue 0
>      send "info threads\n"
>      expect {
> -               -re " \[0-9\]+ process .*(gdb)" {
> +               -re " \[0-9\]+ Thread .*(gdb)" {
>         set buf $expect_out(0,string)
>         }
>         timeout {
> @@ -47,7 +47,7 @@
>                 return 1
>         }
>      }
> -    set curr_thread [check_buf $buf "process"]
> +    set curr_thread [check_buf $buf "Thread"]
>      if { $curr_thread == 0 } {
>         send_user "check_threads (no current thread)\n"
>         return 1
> @@ -76,7 +76,7 @@
>                                   return 1
>                          }
>                  }
> -                set number1 [check_buf $buf "(process"]
> +                set number1 [check_buf $buf "(Thread"]
>                  send "bt\n"
>                  expect {
>                          -re  " bt.*#\[0-9\]+ .*(gdb)" {
> @@ -101,13 +101,13 @@
>  }

This part of the test is quite fragile. This will break if LANG is not
set to English language. Moreover this change will break the older gdb,
do you know in which gdb version were these messages changed?

>  proc check_fpu {num} {
> +       exp_internal 1
>         global expect_out
>         global pass
> -       send "\n"
> -       send "info register\n"
> -       send "\n"
> +       send "set pagination off\n"
> +       send "info all-register\n"
>         expect {
> -               -re "xmm$num\[\t \]+\{f \= .*\}+\[\t \]+\{f \= .*\}" {
> +               -re "xmm$num\[\t \]+\{.*f.* \= .*\}" {
>                         set buf $expect_out(0,string)
>                 }
>                 timeout {
> @@ -130,8 +130,8 @@
>         }
>  }

Aargh, even more fragile.

I doubt that this part works with anything else but the gdb version it
was written for.



Given the state of the test and the uncertain functionality I would vote
for removal. Anybody else has better idea?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] Test suite for the t-core kernel patch
@ 2013-10-22  4:45 C N
  2013-10-22 17:57 ` chrubis
  0 siblings, 1 reply; 4+ messages in thread
From: C N @ 2013-10-22  4:45 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 154 bytes --]

Hi,

Is there any plan for removal of t-core test case?

Please ref:
http://sourceforge.net/p/ltp/mailman/message/31006567/

- - - -
Chandrashekhar Nandi

[-- Attachment #1.2: Type: text/html, Size: 309 bytes --]

[-- Attachment #2: Type: text/plain, Size: 416 bytes --]

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk

[-- Attachment #3: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] Test suite for the t-core kernel patch
  2013-10-22  4:45 [LTP] Test suite for the t-core kernel patch C N
@ 2013-10-22 17:57 ` chrubis
  0 siblings, 0 replies; 4+ messages in thread
From: chrubis @ 2013-10-22 17:57 UTC (permalink / raw)
  To: C N; +Cc: ltp-list

Hi!
> Is there any plan for removal of t-core test case?
> 
> Please ref:
> http://sourceforge.net/p/ltp/mailman/message/31006567/

Thanks for reminding. I've just pushed a patch that removes the testcase
to git.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-22 17:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22  4:45 [LTP] Test suite for the t-core kernel patch C N
2013-10-22 17:57 ` chrubis
  -- strict thread matches above, loose matches on Subject: below --
2013-06-04 22:17 C Nandi
2013-06-06 12:15 ` chrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox