File: hasafs-t.c

package info (click to toggle)
libpam-afs-session 2.6-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,684 kB
  • sloc: sh: 11,779; ansic: 7,910; perl: 270; makefile: 174
file content (39 lines) | stat: -rw-r--r-- 781 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * Test handling of k_hasafs failure.
 *
 * Written by Russ Allbery <eagle@eyrie.org>
 * Copyright 2015 Russ Allbery <eagle@eyrie.org>
 * Copyright 2011
 *     The Board of Trustees of the Leland Stanford Junior University
 *
 * See LICENSE for licensing terms.
 */

#include <config.h>
#include <portable/system.h>

#include <tests/fakepam/script.h>
#include <tests/tap/basic.h>

/* Provided by the fakekafs layer. */
extern int fakekafs_hasafs;


int
main(void)
{
    struct script_config config;

    /* Set up the plan. */
    plan_lazy();

    /* Claim that AFS doesn't exist. */
    fakekafs_hasafs = 0;

    /* Run all of the tests. */
    memset(&config, 0, sizeof(config));
    config.user = "test";
    run_script_dir("data/scripts/hasafs", &config);

    return 0;
}