9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * This file and its contents are supplied under the terms of the
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Common Development and Distribution License ("CDDL"), version 1.0.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * You may only use this file in accordance with the terms of version
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * 1.0 of the CDDL.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * A full copy of the text of the CDDL should have accompanied this
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * source. A copy of the CDDL is also available via the Internet at
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Copyright (c) 2015, Joyent, Inc.
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi * Test getentropy(3C)
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi /* Max buffer is 256 bytes, verify if we go larger, we error */
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi /* Bad buffers */
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi /* Jump through a hoop to know we'll always have a bad address */
9d12795f87b63c2e39e87bff369182edd34677d3Robert Mustacchi addr = mmap(NULL, 4096, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0);