From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4367C26C.8070600@domain.hid> Date: Tue, 01 Nov 2005 12:30:52 -0700 From: Jim Cromie MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040800090900050907020206" Subject: [Xenomai-core] xeno-test etc List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org This is a multi-part message in MIME format. --------------040800090900050907020206 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit folks, Ive been tinkering with xeno-test, adding a bunch of platform-info to support comparison of results from various platforms submitted by different xenomai users. - cat /proc/config.gz if -f /proc/config.gz - cat /proc/cpuinfo - cat /proc/meminfo - cat /proc/adeos/* foreach /proc/adeos/* - cat /proc/ipipe/* foreach /proc/ipipe/* - xeno-config --v - xeno-info - (uname -a is available in xeno-config or xeno-info, dont need separately) However, Ive gotten a bit bogged down in the workload mgmt parts; they dont work quite the way Id like, and bash is tedious to do job control in scripts. What I want: support for 2 separate test-scenarios, described by the latency cmdln options: if ( -T X>0) workload job termination is detected and restarted. keeps workload conditions uniform for duration of test not needed for default workload - dd if=/dev/zero never finishes. needed for if=/dev/hda1, since partitions are finite. (real devices produce interrupts, so they make a better/harder test) if ( -w1 and -T 0 ) workload termination should end the currently running latency-test. runtime of latency test can be realistically compared to the same workload running normally. this sort-of turns the test inside-out; the workload becomes the 'goal' and the latency tests are the load. There are 2 conflicting forces (in GOF sense) driving my thinking wrt this script. - We want to support busybox , /bin/ash - we want the above features (which I havent gotten working in bash/ash yet) - Ash doesnt support several bash features, including at least 1 used in xeno-test (array vars) - we want more features ?? Given the tedium of fixing the bash-script bugs, I ended up prepping 2 new experiments: - ripped most bash code out, leaving only job-control stuff. tinkered with it, but it still has problems. - wrote an 'equivalent' (to above) perl version which does job-control (seems ok) perl version can run arbitrary bash loops also: not just 'dd if=/dev/zero of=/dev/null' but also ' while true; do echo hey $$; sleep 5; done' or ' cd ../../lmbench; make rerun; done' The ash version: AFAICT, the sticking point is waiting for work-load tasks; shell's wait is a blocking call, so I cant use it to catch individual workload exits, but I cant wait for all 3 workloads to end b4 restarting any of them. (load uniformity) trapping sig CHLD almost works; I cant recover the child pid in the handler, but perhaps I dont need it.. When I test using a dd workload, Im getting spurious signals, and the sig-handler dumbly restarts it, but wo the pid, its hard to know whether the signalling process is really dying, or something else ( which is partly what happens ) The bad behavior Im seeing now is that: the sig-handler fires evry 5 sec, in the while 1 { sleep 5 } loop. This suggests that Im missing something important wrt the signals. SO: 0. is the inside-out test scenario compelling ? 1. can anyone see whats wrong with the ash version ? 2. do I need an intermediate 'restart & wait' process to restart each (possibly finite) workload, so main process can wait on all its children together (block til they all return) 3. can somone see a simpler way ? 4. if the bash script cant be fixed (seems unlikely), do we want a perl version too ? 5. umm tia jimc PS. with all the hard work going on, I feel a bit lazy sending 2 semi-broken script-snippets, but.. well, I *am* lazy. Im also sending a semi-working version of xeno-test, as promised weeks ago. Pls dont apply, but give a look-see. One 'controversial' addition is POD, (plain old documentation). I think its readable as it is, and it has the virtue of not being in a separate file, so its easier to maintain. For a little flame-bait, I added -Z option, which gives extended help (-H is taken by latency). PPS. long options would be nice, but is unsupported by getopts. To use them, we'd need to do so in both xeno-test, and *latency progs, since xeno-test passes latency options thru when it invokes *latency. Anyone seen a version that does long options, and would work on ash & bash ? ok, enough prattling. --------------040800090900050907020206 Content-Type: text/plain; name="p-xt-c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p-xt-c" Index: scripts/xeno-test.in =================================================================== --- scripts/xeno-test.in (revision 91) +++ scripts/xeno-test.in (working copy) @@ -7,8 +7,8 @@ -w spawn N workloads (dd if=/dev/zero of=/dev/null) default=1 -d used as alternate src in workload (dd if=$device ..) The device must be mounted, and (unfortunately) cannot - be an NFS mount a real device (ex /dev/hda) will - generate interrupts + be an NFS mount. A real device (ex /dev/hda) will + generate interrupts, /dev/zero,null will not. -W