xref: /freebsd/tests/sys/cddl/zfs/include/libtest_test.sh (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1*2fae26bdSAlan Somers# CDDL HEADER START
2*2fae26bdSAlan Somers#
3*2fae26bdSAlan Somers# The contents of this file are subject to the terms of the
4*2fae26bdSAlan Somers# Common Development and Distribution License (the "License").
5*2fae26bdSAlan Somers# You may not use this file except in compliance with the License.
6*2fae26bdSAlan Somers#
7*2fae26bdSAlan Somers# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8*2fae26bdSAlan Somers# or http://www.opensolaris.org/os/licensing.
9*2fae26bdSAlan Somers# See the License for the specific language governing permissions
10*2fae26bdSAlan Somers# and limitations under the License.
11*2fae26bdSAlan Somers#
12*2fae26bdSAlan Somers# When distributing Covered Code, include this CDDL HEADER in each
13*2fae26bdSAlan Somers# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14*2fae26bdSAlan Somers# If applicable, add the following below this CDDL HEADER, with the
15*2fae26bdSAlan Somers# fields enclosed by brackets "[]" replaced with your own identifying
16*2fae26bdSAlan Somers# information: Portions Copyright [yyyy] [name of copyright owner]
17*2fae26bdSAlan Somers#
18*2fae26bdSAlan Somers# CDDL HEADER END
19*2fae26bdSAlan Somers#
20*2fae26bdSAlan Somers
21*2fae26bdSAlan Somers#
22*2fae26bdSAlan Somers# Copyright 2016 Spectra Logic.  All rights reserved.
23*2fae26bdSAlan Somers# Use is subject to license terms.
24*2fae26bdSAlan Somers#
25*2fae26bdSAlan Somers
26*2fae26bdSAlan Somersatf_test_case raidz_dva_to_block_addr
27*2fae26bdSAlan Somersraidz_dva_to_block_addr_head()
28*2fae26bdSAlan Somers{
29*2fae26bdSAlan Somers	atf_set "descr" "Unit tests for raidz_dva_to_block_addr"
30*2fae26bdSAlan Somers}
31*2fae26bdSAlan Somersraidz_dva_to_block_addr_body()
32*2fae26bdSAlan Somers{
33*2fae26bdSAlan Somers	. $(atf_get_srcdir)/default.cfg
34*2fae26bdSAlan Somers
35*2fae26bdSAlan Somers	# These test cases were determined by hand on an actual filesystem
36*2fae26bdSAlan Somers	atf_check_equal 3211 `raidz_dva_to_block_addr 0:3f40000:4000 3 13`
37*2fae26bdSAlan Somers}
38*2fae26bdSAlan Somers
39*2fae26bdSAlan Somersatf_init_test_cases()
40*2fae26bdSAlan Somers{
41*2fae26bdSAlan Somers	atf_add_test_case raidz_dva_to_block_addr
42*2fae26bdSAlan Somers}
43