The following two scripts cannot execute correctly on my box, which doesn’t equip gawk but awk (busybox). This patch makes them, as well as other scripts( see the patch), to not explicitly using gawk but awk. roylee@andestech.com.
diff --git a/testcases/commands/cron/cron_allow01 b/testcases/commands/cron/cron_allow01
index af8d8b0..501f6c4 100755
--- a/testcases/commands/cron/cron_allow01
+++ b/testcases/commands/cron/cron_allow01
@@ -106,7 +106,7 @@
crontab -l | grep '^[^#]' > /tmp/crontab-cronallow-save-$iam
crontab - << EOF
- `date '+%M' | gawk '{ORS=""; print ($1+2)%60 " * * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_allow_test 2>&1
+ `date '+%M' | awk '{ORS=""; print ($1+2)%60 " * * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_allow_test 2>&1
EOF
if [ $? != 0 ]; then
echo Error while adding crontab for user $TEST_USER1
@@ -143,7 +143,7 @@
crontab -l | grep '^[^#]' > /tmp/crontab-cronallow-save-$iam
crontab - << EOF
- `date '+%M' | gawk '{ORS=""; print ($1+2)%60 " * * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_allow_test1 2>&1
+ `date '+%M' | awk '{ORS=""; print ($1+2)%60 " * * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_allow_test1 2>&1
EOF
if [ $? != 0 ]; then
echo Error while adding crontab for user $TEST_USER2
diff --git a/testcases/commands/cron/cron_deny01 b/testcases/commands/cron/cron_deny01
index 2ecb0bf..95bb93d 100755
--- a/testcases/commands/cron/cron_deny01
+++ b/testcases/commands/cron/cron_deny01
@@ -104,7 +104,7 @@
echo "(1) TEST THAT PERSON NOT IN $CRON_DENY IS ABLE TO RUN JOB."
crontab - << EOF
- `date '+%M %H' | gawk '{ORS=""; print ($1+2)%60" "$2" * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_deny_test 2>&1
+ `date '+%M %H' | awk '{ORS=""; print ($1+2)%60" "$2" * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_deny_test 2>&1
EOF
if [ $? != 0 ]; then
echo Error while adding crontab for user $TEST_USER1
@@ -133,7 +133,7 @@
echo "(2) TEST THAT PERSON IN $CRON_DENY IS NOT ABLE TO RUN JOB."
crontab - << EOF
- `date '+%M' | gawk '{ORS=""; print ($1+2)%60 " * * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_deny_test 2>&1
+ `date '+%M' | awk '{ORS=""; print ($1+2)%60 " * * * * "}'` echo "TEST JOB RAN" >> /tmp/cron_deny_test 2>&1
EOF
if [ $? != 0 ]; then
echo Error while adding crontab for user $TEST_USER2
diff --git a/testcases/commands/cron/cron_neg_tests.sh b/testcases/commands/cron/cron_neg_tests.sh
index 50d382f..769ca34 100755
--- a/testcases/commands/cron/cron_neg_tests.sh
+++ b/testcases/commands/cron/cron_neg_tests.sh
@@ -100,7 +100,7 @@
chmod 755 /tmp/$tmpscript
#
-cronline=`date '+%M' | gawk '{print ($1+2)%60 " * * * * "}'`
+cronline=`date '+%M' | awk '{print ($1+2)%60 " * * * * "}'`
(echo "$cronline /tmp/$tmpscript >> /tmp/$tmpscript.out 2>> /tmp/$tmpscript.out" ; \
echo "$cronline /tmp/$tmpscript >> /$tmpscript.out 2>> /$tmpscript.out") \
| crontab -
diff --git a/testcases/kernel/ipc/ipc_stress/cleanup b/testcases/kernel/ipc/ipc_stress/cleanup
index 6513f38..3885bb1 100755
--- a/testcases/kernel/ipc/ipc_stress/cleanup
+++ b/testcases/kernel/ipc/ipc_stress/cleanup
@@ -1,18 +1,18 @@
#!/bin/sh
-SEMS=`ipcs -sp | gawk '{printf " %d", $1}' | sed -e 's/ 0//g'`
+SEMS=`ipcs -sp | awk '{printf " %d", $1}' | sed -e 's/ 0//g'`
if test "$SEMS" != ""; then
echo ipcrm sem $SEMS
ipcrm sem $SEMS
fi
-MSGS=`ipcs -qp | gawk '{printf " %d", $1}' | sed -e 's/ 0//g'`
+MSGS=`ipcs -qp | awk '{printf " %d", $1}' | sed -e 's/ 0//g'`
if test "$MSGS" != ""; then
echo ipcrm msg $MSGS
ipcrm msg $MSGS
fi
-SHMS=`ipcs -mp | gawk '{printf " %d", $1}' | sed -e 's/ 0//g'`
+SHMS=`ipcs -mp | awk '{printf " %d", $1}' | sed -e 's/ 0//g'`
if test "$SHMS" != ""; then
echo ipcrm shm $SHMS
ipcrm shm $SHMS
diff --git a/testcases/kernel/ipc/ipc_stress/run_semaphore_test_01.sh b/testcases/kernel/ipc/ipc_stress/run_semaphore_test_01.sh
index 622a34c..c5cdaf3 100755
--- a/testcases/kernel/ipc/ipc_stress/run_semaphore_test_01.sh
+++ b/testcases/kernel/ipc/ipc_stress/run_semaphore_test_01.sh
@@ -99,7 +99,7 @@
fi
# Get the semphore ID by "ipcs -s"
-SEMS=`ipcs -s | gawk '{printf " %d", $2}' | sed -e 's/ 0//g'`
+SEMS=`ipcs -s | awk '{printf " %d", $2}' | sed -e 's/ 0//g'`
for SEM_IPCS in $SEMS
do
if [[ $SEM_IPCS -eq $SEM_ID ]];then
diff --git a/testcases/open_hpi_testsuite/clients/hpionIBMblade.c b/testcases/open_hpi_testsuite/clients/hpionIBMblade.c
index cfa3e6d..a330483 100644
--- a/testcases/open_hpi_testsuite/clients/hpionIBMblade.c
+++ b/testcases/open_hpi_testsuite/clients/hpionIBMblade.c
@@ -71,7 +71,7 @@
#include <oHpi.h>
#include <oh_clients.h>
-#define OH_SVN_REV "$Revision: 1.2 $"
+#define OH_SVN_REV "$Revision: 1.3 $"
#define READ_BUF_SIZE 1024
#define MAX_BYTE_COUNT 128
@@ -874,7 +874,7 @@
/*
- CH_SLOT=`echo $X | gawk '{i=20; x=x $i; print x}'`
+ CH_SLOT=`echo $X | awk '{i=20; x=x $i; print x}'`
*/
if (byte_count >= 3) {
memcpy(&str2, &VPD_DATA[39], 2);