dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / dtrace / test / tst / common / pid / tst.utf8probefunc.ksh
blobc5d4abfb59f0986c7f51f36776af67f4c6180781
1 #!/bin/ksh -p
3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
6 # 1.0 of the CDDL.
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
14 # Copyright (c) 2013 Joyent, Inc. All rights reserved.
17 DIR=/var/tmp/dtest.$$
18 mkdir $DIR
19 cd $DIR
21 cat > foo.c <<EOF
22 #include <stdio.h>
24 void
25 foo()
27 printf("in foo\n");
30 void
31 main()
33 foo();
35 EOF
37 if ! gcc -m32 -S -o foo.orig.s foo.c ; then
38 print -u 2 "failed to compile foo in $DIR"
39 exit 1
43 # There's the right way, the wrong way, and the Max Power way!
45 cat foo.orig.s | sed 's/foo/foø/g' > foo.s
46 gcc -o foo foo.s
48 if ! dtrace -n 'pid$target:a.out:f*:entry{printf("probefunc: %s\n", \
49 probefunc)}' -qc ./foo ; then
50 print -u 2 "dtrace failed in $DIR"
51 exit 1
55 rm -rf $DIR
56 exit 0