1#!/usr/bin/ksh 2# 3# 4# This file and its contents are supplied under the terms of the 5# Common Development and Distribution License ("CDDL"), version 1.0. 6# You may only use this file in accordance with the terms of version 7# 1.0 of the CDDL. 8# 9# A full copy of the text of the CDDL should have accompanied this 10# source. A copy of the CDDL is also available via the Internet at 11# http://www.illumos.org/license/CDDL. 12# 13 14# 15# Copyright 2021 Oxide Computer Company 16# 17 18ERR=0 19 20function bad_num 21{ 22 if $MDB -e $*; then 23 print -u2 "TEST FAILED: $*" 24 ERR=1 25 else 26 print "TEST PASSED: $*" 27 fi 28} 29 30bad_num "0x_123=E" 31bad_num "0xzasdf=K" 32bad_num "0x1__p=K" 33bad_num "0i_=K" 34bad_num "0i__011=K" 35bad_num "0i12345=K" 36bad_num "0i0____3=K" 37bad_num "0t34___asdf=K" 38bad_num "0t_4=K" 39bad_num "0tp=K" 40bad_num "0tp__4=K" 41bad_num "0t4______p=K" 42bad_num "0o89=K" 43bad_num "0o7____89=K" 44bad_num "0o__324=K" 45bad_num "0x123456789abcdef123456789abcdef=K" 46bad_num "0x12___345678___9abcdef123456789_a_bcdef=K" 47 48exit $ERR 49