Up

Traces

linux[3.13.0-29-generic][system[GNU C Library (GNU libc) stable release version 2.21, by Roland McGrath et al.]][ext4_loop[mke2fs 1.42.9 (4-Feb-2014)]]@[2015-07-24T12:49:43Z./nix/store/fxisrpncjn4cxxwnq2lvilriqx63s9k9-fs_test]

Checked Trace
linux_spec@[/nix/store/fxisrpncjn4cxxwnq2lvilriqx63s9k9-fs_test] sexp stdout stderr
Traced Execution stdout stderr
Script script

Combined Trace

1 # processing file 'adhoc_mkdir_link_count-int.trace' ...
2 @type trace
3
4 # ##########################################
5 # Test link count of files after mkdir
6 # ##########################################
7
8 # root should have link count 1
9 stat "/"
10 Tau
11
RV_stat {
st_dev=1792;
st_ino= 32644;
st_kind= S_IFDIR;
st_perm= 0o777;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
THE SPEC ASSERTS THE STATE SET IS EMPTY
The spec permitted:
  • RV_stat {
    st_dev=2049;
    st_ino= 0;
    st_kind= S_IFDIR;
    st_perm= 0o777;
    st_nlink=1;
    st_uid= 0;
    st_gid= 0;
    st_rdev=0;
    st_size= 9999;
    }
expected st_nlink 1 but got st_nlink 2
12
13 # a new dir should have link count 2
14
15 mkdir "/dir1" 0o777
16 Tau
17 RV_none
18 stat "/dir1"
19 Tau
20
RV_stat {
st_dev=1792;
st_ino= 32641;
st_kind= S_IFDIR;
st_perm= 0o755;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
21
22 # adding a subdir should increase the link count of the dir
23
24 mkdir "/dir1/subdir1" 0o777
25 Tau
26 RV_none
27 stat "/dir1"
28 Tau
29
RV_stat {
st_dev=1792;
st_ino= 32641;
st_kind= S_IFDIR;
st_perm= 0o755;
st_nlink=3;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
30 stat "/dir1/subdir1"
31 Tau
32
RV_stat {
st_dev=1792;
st_ino= 32642;
st_kind= S_IFDIR;
st_perm= 0o755;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
33
34 # adding a subsubdir should leave the link count unaltered of the dir
35
36 mkdir "/dir1/subdir1/subsbudir1" 0o777
37 Tau
38 RV_none
39 stat "/dir1"
40 Tau
41
RV_stat {
st_dev=1792;
st_ino= 32641;
st_kind= S_IFDIR;
st_perm= 0o755;
st_nlink=3;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
42 stat "/dir1/subdir1"
43 Tau
44
RV_stat {
st_dev=1792;
st_ino= 32642;
st_kind= S_IFDIR;
st_perm= 0o755;
st_nlink=3;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
45 stat "/dir1/subdir1/subsbudir1"
46 Tau
47
RV_stat {
st_dev=1792;
st_ino= 32643;
st_kind= S_IFDIR;
st_perm= 0o755;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 4096;
}
48
49