示例#1
0
# On Windows fd interface doesn't support temporary files
# FreeBSD doesn't support O_TMPFILE
@t.linux_only
class TEST4(t.Test):
    test_type = t.Short

    def run(self, ctx):
        ctx.exec('pmem2_source_size', 'test_tmpfile_fd', ctx.testdir,
                 16 * t.MiB)


# XXX doesn't work
# @t.windows_only
# class TEST5(t.Test):
#    test_type = t.Short
#
#    def run(self, ctx):
#        ctx.exec('pmem2_source_size', 'tmp_file_handle',
#                 ctx.testdir, str(16 * t.MiB))


@t.windows_exclude
@t.require_devdax(t.DevDax('devdax1'))
class TEST6(t.Test):
    test_type = t.Short

    def run(self, ctx):
        dd = ctx.devdaxes.devdax1
        ctx.exec('pmem2_source_size', 'test_normal_file_fd', dd.path, dd.size)
示例#2
0
文件: TESTS.py 项目: pmem-bot/pmdk
@t.windows_exclude
@t.require_granularity(t.ANY)
class TEST2(t.BaseTest):
    test_type = t.Short

    def run(self, ctx):
        ctx.exec('pmem2_config_get_alignment', 'test_directory', ctx.testdir)


class PMEM2_CONFIG_GET_ALIGNMENT_DEV_DAX(t.Test):
    test_type = t.Short
    test_case = "test_get_alignment_success"

    def run(self, ctx):
        dd = ctx.devdaxes.devdax
        ctx.exec('pmem2_config_get_alignment', self.test_case, dd.path,
                 str(dd.alignment))


@t.windows_exclude
@t.require_devdax(t.DevDax('devdax', alignment=2 * t.MiB))
class TEST3(PMEM2_CONFIG_GET_ALIGNMENT_DEV_DAX):
    pass


@t.windows_exclude
@t.require_devdax(t.DevDax('devdax', alignment=4 * t.KiB))
class TEST4(PMEM2_CONFIG_GET_ALIGNMENT_DEV_DAX):
    pass