Retested the at_deny01 case, and found the same issue[2]. The below is the test
steps, if something wrong, please note me.
1. create a runtest/at file
r...@godwin-desktop:/home/godwin/LTP_New/ltp-full-20100630# cat runtest/at
at_deny01 at_deny01
2. fixed the issue[1]
3. ./runltp -p -l a.txt -f at
Seems it is a environment setup issue, test_user_1 does not have the
${LTPROOT}/testcases/bin in its PATH.
Attached the log
Best Regression
Godwin Gao
Subject: Re: [LTP] [PATCH]fix the at_deny01 failure
From: [email protected]
Date: Fri, 20 Aug 2010 06:54:13 -0700
CC: [email protected]
To: [email protected]
On Aug 20, 2010, at 1:08 AM, GaoGodwin wrote:Hi,
There are three failures found when running the LTP at_deny01 case.
[1] at_deny01 1 TCONF : at command not found on system
[2] /home/test_user_1/at_deny01: line 129: tst_resm: command not found
[3] You are required to change your password immediately (root enforced)
The root causes of these failures:
[1] In the shell script, if the return value of a function is 0, it view as
TRUE. In the at_deny01
162 if type at > /dev/null; then
163 tst_resm TCONF "at command not found on system"
if the system has at function, shell script will print "at command not found on
system". This is opposite.
[2] In the at_deny01, root user will create user named a test_user_1, copy the
file at_deny01 to the home directory of test_user_1,
change user to test_user_1 and run the at_deny01 script.
when run the script, ${LTPROOT}/testcase/bin is in the environment variable of
root, but NOT in the test_user_1. So when the test_user_1
run this script, it can NOT find the tst_resm command.
[3] When some boards boot up, the system time is 010100001970. the Linux system
will let NON-root user change its password immediately
and stop the script running. This patch will let the script run normally
without changing the password.
Patch attached, I have checked it on the Ubuntu.
Signed-off-by: Godwin Gao <[email protected]>
I'd accept item 1, because it fixes the issue seen. I wouldn't accept the rest,
because:
2. This is a non-issue; you should setup your environmnent properly before
running scripts because runltp already does this properly. Otherwise we'd have
an inconsistently `fixed' test script. It doesn't look like this is fixed in
the patch anyhow.3. I can't fix every issue pertaining to user logins, and we
shouldn't. There's enough code in the sourcebase that uses similar logic, so if
it needs to be expressed somewhere, please let me know so we can address this
`issue' universally, not just one off in this test script.
Also, why are you calling su with -p now? It's for preserving the environment
according to the GNU coreutils page:
http://www.gnu.org/software/coreutils/manual/html_node/su-invocation.html .
Thanks,-Garrett Script started on Mon Aug 23 11:04:07 2010
]0;r...@godwin-desktop: /home/godwin/LTP_New/ltp-full-20100630r...@godwin-desktop:/home/godwin/LTP_New/ltp-full-20100630# ./at[2Plscd ..[3Plscd fs_bind/ls[Krm -rf at_deny01.resultLTP_RUN_ON-2010_ ls[Kvi at_deny01.result ls[Kcd results/./runltp -p -l at_deny01.result -f at
INFO: creating /home/godwin/LTP_New/ltp-full-20100630/results directory
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION="Ubuntu 8.10"
Linux godwin-desktop 2.6.27-17-generic #1 SMP Wed Jan 27 23:14:44 UTC 2010 i686 GNU/Linux
Gnu C gcc (Ubuntu 4.3.2-1ubuntu12) 4.3.2
Gnu make 3.81
util-linux ng 2.14)
mount ng 2.14 (with libvolume_id and selinux support)
modutils 3.3-pre11
e2fsprogs 1.41.3
PPP 2.4.4
Linux C Library 2.8.90
Dynamic linker (ldd) 2.8.90
Procps 3.2.7
Net-tools 1.60
iproute2 iproute2-ss080417
Kbd 1.14.1
Sh-utils 6.10
Modules Loaded af_packet binfmt_misc i915 drm rfcomm sco bridge stp bnep l2cap bluetooth vboxnetadp vboxnetflt vboxdrv nfsd auth_rpcgss exportfs ppdev ipv6 acpi_cpufreq cpufreq_userspace cpufreq_conservative cpufreq_stats cpufreq_ondemand cpufreq_powersave freq_table wmi video output pci_slot sbs sbshc container bay battery nfs lockd nfs_acl sunrpc iptable_filter ip_tables x_tables ac lp snd_hda_intel psmouse serio_raw pcspkr dcdbas snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy evdev snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device parport_pc parport snd soundcore intel_agp button snd_page_alloc iTCO_wdt iTCO_vendor_support shpchp pci_hotplug agpgart heci ext3 jbd mbcache sr_mod cdrom sd_mod crc_t10dif usbhid hid sg pata_acpi ahci ehci_hcd uhci_hcd ata_generic e1000e usbcore libata scsi_mod dock floppy thermal processor fan fbcon tileblit font bitblit softcursor fuse
free reports:
total used free shared buffers cached
Mem: 2028964 1882212 146752 0 20640 599316
-/+ buffers/cache: 1262256 766708
Swap: 5944008 2132 5941876
/proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
stepping : 11
cpu MHz : 2000.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 5319.94
clflush size : 64
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
stepping : 11
cpu MHz : 2000.000
cache size : 4096 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm
bogomips : 5319.93
clflush size : 64
power management:
remove test cases which require the block device.
You can specify it with option -b
COMMAND: /home/godwin/LTP_New/ltp-full-20100630/bin/ltp-pan -e -S -a 7693 -n 7693 -p -f /tmp/ltp-kmTkQP7699/alltests -l /home/godwin/LTP_New/ltp-full-20100630/results/at_deny01.result -C /home/godwin/LTP_New/ltp-full-20100630/output/LTP_RUN_ON-at_deny01.result.failed
LOG File: /home/godwin/LTP_New/ltp-full-20100630/results/at_deny01.result
FAILED COMMAND File: /home/godwin/LTP_New/ltp-full-20100630/output/LTP_RUN_ON-at_deny01.result.failed
Running tests.......
<<<test_start>>>
tag=at_deny01 stime=1282532659
cmdline="at_deny01"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Root the PATH is /usr/include:/usr/local/arm/2.95.3/bin:/usr/include:/usr/local/arm/2.95.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/godwin/LTP_New/ltp-full-20100630/testcases/bin
* Stopping deferred execution scheduler atd [166G
[160G[ OK ]
* Starting deferred execution scheduler atd [166G
[160G[ OK ]
TEST: /etc/at.deny should deny only those who are not in the file to run jobs.
(1) TEST THAT PERSON NOT IN /etc/at.deny IS ABLE TO RUN JOB.
warning: commands will be executed using /bin/sh
job 41 at Mon Aug 23 11:05:00 2010
test_user_1 the PATH is /usr/local/bin:/usr/bin:/bin:/usr/games
Sleeping for 75 seconds....
/home/test_user_1/at_deny01: line 131: tst_resm: command not found
(2) TEST THAT PERSON IN /etc/at.deny IS NOT ABLE TO RUN JOB.
You do not have permission to use at.
Expected error while adding job user at for user test_user_2
test_user_2 the PATH is /usr/local/bin:/usr/bin:/bin:/usr/games
Sleeping for 75 seconds....
At denyed user to execute test job, TEST PASSED.
<<<execution_status>>>
initiation_status="ok"
duration=150 termination_type=exited termination_id=0 corefile=no
cutime=6 cstime=7
<<<test_end>>>
INFO: ltp-pan reported all tests PASS
LTP Version: LTP-20100630
###############################################################"
Done executing testcases."
LTP Version: LTP-20100630
###############################################################"
]0;r...@godwin-desktop: /home/godwin/LTP_New/ltp-full-20100630r...@godwin-desktop:/home/godwin/LTP_New/ltp-full-20100630# cat results/at_deny01.result
Test Start Time: Mon Aug 23 11:04:19 2010
-----------------------------------------
Testcase Result Exit Value
-------- ------ ----------
at_deny01 PASS 0
-----------------------------------------------
Total Tests: 1
Total Failures: 0
Kernel Version: 2.6.27-17-generic
Machine Architecture: i686
Hostname: godwin-desktop
]0;r...@godwin-desktop: /home/godwin/LTP_New/ltp-full-20100630r...@godwin-desktop:/home/godwin/LTP_New/ltp-full-20100630# exit
Script done on Mon Aug 23 11:07:27 2010
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list