tst.userlandkey.ksh revision a386cc11a86ecb60f5a48078d22c1500e2ad003e
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# This file and its contents are supplied under the terms of the
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# You may only use this file in accordance with the terms of version
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# 1.0 of the CDDL.
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# source. A copy of the CDDL is also available via the Internet at
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# Copyright (c) 2013 Joyent, Inc. All rights reserved.
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi# Simple test that if we manually use the userland keyword that it
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchiif [ $# != 1 ]; then
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi echo expected one argument: '<'dtrace-path'>'
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchit="zelda_info_t"
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi echo "CTF does not exist in $exe, that's a bug" >&2
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchitypedef struct info {
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi char *zi_gamename;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi int zi_ndungeons;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi char *zi_villain;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi int zi_haszelda;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchipid$pid::has_princess:entry
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi this->t = (userland info_t *)arg0;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi printf("game: %s, dungeon: %d, villain: %s, zelda: %d\n",
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi stringof(this->t->zi_gamename), this->t->zi_ndungeons,
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi stringof(this->t->zi_villain), this->t->zi_haszelda);
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchipid$pid::has_dungeons:entry
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi this->t = (userland info_t *)arg0;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi printf("game: %s, dungeon: %d, villain: %s, zelda: %d\n",
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi stringof(this->t->zi_gamename), this->t->zi_ndungeons,
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi stringof(this->t->zi_villain), this->t->zi_haszelda);
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchipid$pid::has_villain:entry
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi this->t = (userland info_t *)arg0;
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi printf("game: %s, dungeon: %d, villain: %s, zelda: %d\n",
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi stringof(this->t->zi_gamename), this->t->zi_ndungeons,
a386cc11a86ecb60f5a48078d22c1500e2ad003eRobert Mustacchi stringof(this->t->zi_villain), this->t->zi_haszelda);