PERL @ (at sign) and ARRAY

commandline session $cat array.pl #!/usr/bin/perl use strict; use warnings; my @colors = (“red”,”green”,”blue”); print “@colors”; print “n”; $perl array.pl red green blue $vim array.pl $cat array.pl #!/usr/bin/perl use strict; use warnings; my @colors = (“red”,”green”,”blue”); print “@colors”; print “n”; print $color[0]; print “n”; $perl array.pl Global symbol “@color” requires explicit package name at array.pl line …

Perl TESTING for gcc compiler option related

commandline session $cat testgcc.pl #!/usr/bin/perl -w use Test::More tests => 2 ; my $result; system “gcc unsigned.c”; $result = `./a.out`; #print $result; ok ($result lt 0); system “gcc -funsigned-char unsigned.c”; $result = `./a.out`; #print $result; ok ($result gt 0); $cat unsigned.c #include int main(void) { char c = -10; printf(“%d”,c); return 0; } $perl testgcc.pl …

PERL TESTING Print only ok/not ok

commandline session $cat test5.pl #!/usr/bin/perl use strict; use warnings; my $result; $result = `/usr/bin/concalc 1 + 1`; print $result; if ( $result == 1 ) { print “okn”; } else { print “not okn”; } $result = `/usr/bin/concalc 2 + 2`; if ( $result == 4 ) { print “okn”; } else { print “not …

Linux KERNEL TESTING asynctest TINKER ON PYTHON SHELL

$python Python 2.7.3 (default, Jun 15 2012, 15:26:07) [GCC 4.7.0] on linux2 Type “help”, “copyright”, “credits” or “license” for more information. >>> from autotest.client import utils, test >>> x = utils.AsyncJob(“sleep 1 && echo hi && sleep 1 && echo hi && sleep 1 && echo hi && sleep 1”) DEBUG:root:Running ‘sleep 1 && echo …

Linux KERNEL TESTING asynctest

commandline session $sudo autotest-local run asynctest/ 18:58:57 INFO | Writing results to /usr/local/lib/python2.7/dist-packages/autotest/client/results/default 18:58:58 INFO | START —- —- timestamp=13625710038 localtime=Mar 06 18:58:58 18:58:58 INFO | START asynctest asynctest timestamp=13625710038 localtime=Mar 06 18:58:58 18:59:00 INFO | Process 1 stdout is now hi 18:59:00 INFO | hi 18:59:00 INFO | 18:59:02 INFO | Process 1 result …

Linux KERNEL TESTING signaltest

ABOUT Signal(IPC) Signals are a limited form of inter-process communication (IPC), typically used in Unix, Unix-like, and other POSIX-compliant operating systems. A signal is an asynchronous notification sent to a process or to a specific thread within the same process in order to notify it of an event that occurred. Signals originated in 1970s Bell …