summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-comm/comm.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-comm/comm.tests')
-rwxr-xr-xshell/ash_test/ash-comm/comm.tests20
1 files changed, 20 insertions, 0 deletions
diff --git a/shell/ash_test/ash-comm/comm.tests b/shell/ash_test/ash-comm/comm.tests
new file mode 100755
index 000000000..671bfc176
--- /dev/null
+++ b/shell/ash_test/ash-comm/comm.tests
@@ -0,0 +1,20 @@
+{
+echo "#!$THIS_SH"
+echo 'procdir=/proc/$$'
+#echo 'echo " /proc/N/exe: $(basename $(readlink $procdir/exe))"'
+echo 'echo " /proc/N/comm: $(cat $procdir/comm)"'
+} >SCRIPT.sh
+chmod 755 SCRIPT.sh
+
+# comm field was wrong if CONFIG_FEATURE_PREFER_APPLETS=y
+echo './SCRIPT.sh:'
+./SCRIPT.sh
+
+# comm field was wrong if CONFIG_FEATURE_PREFER_APPLETS=y
+echo 'exec ./SCRIPT.sh:'
+(exec ./SCRIPT.sh)
+
+echo 'sh ./SCRIPT.sh:'
+$THIS_SH ./SCRIPT.sh
+
+rm SCRIPT.sh