b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * This file and its contents are supplied under the terms of the
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * Common Development and Distribution License ("CDDL"), version 1.0.
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * You may only use this file in accordance with the terms of version
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * 1.0 of the CDDL.
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * A full copy of the text of the CDDL should have accompanied this
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * source. A copy of the CDDL is also available via the Internet at
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * Copyright 2015 Joyent, Inc.
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * This tests priv_gettext(). The priv_gettext() function always falls back to
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * the C locale if it can't find anything. To deal with that, we've defined a
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * dummy translation for the zz_AA.UTF-8 locale which has a translation for the
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * 'dtrace_kernel' privilege.
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * Normally 'dtrace_kernel' has the following description:
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * Allows DTrace kernel-level tracing.
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * In the zz_AA.UTF-8 locale it has the following description:
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * Ah Elbereth Gilthoniel
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi * We explicitly verify that things respect the global locale and per-thread
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchistatic const char *def = "Allows DTrace kernel-level tracing.\n";
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchistatic const char *trans = "Ah Elbereth Gilthoniel\n";
b599bd937c305a895426e8c412ca920ce7824850Robert Mustacchi loc = newlocale(LC_MESSAGES_MASK, "zz_AA.UTF-8", NULL);