Up

Traces

linux[4.2.5-1-ARCH][system[GNU C Library (GNU libc) stable release version 2.22, by Roland McGrath et al.]][path=/mnt/flashix/[unknown]]@[2015-12-14T16:11:13Z./nix/store/qf513g69n2gy4prf0yhgggwimyl8q7kd-fs_test]

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

Combined Trace

1 # processing file 'adhoc_rename_link_count_file_different_parent-int.trace' ...
2 @type trace
3
4 # ##########################################
5 # Test link count of files after rename
6 # ##########################################
7
8 # test that renaming a file with a link in another existing file does not effect the link count
9
10 open_close "/f1.txt" [O_RDONLY;O_CREAT] 0o666
11 Tau
12 RV_none
13
14 open_close "/f2.txt" [O_RDONLY;O_CREAT] 0o666
15 Tau
16 RV_none
17
18 link "/f1.txt" "/f1_hl.txt"
19 Tau
20 RV_none
21
22 stat "f1.txt"
23 Tau
24
RV_stat {
st_dev=42;
st_ino= 293430;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
25
26 stat "f2.txt"
27 Tau
28
RV_stat {
st_dev=42;
st_ino= 293431;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=1;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
29
30 stat "f1_hl.txt"
31 Tau
32
RV_stat {
st_dev=42;
st_ino= 293432;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
33
34 rename "f1.txt" "f2.txt"
35 Tau
36 RV_none
37
38 stat "f2.txt"
39 Tau
40
RV_stat {
st_dev=42;
st_ino= 293430;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
41
42 stat "f1_hl.txt"
43 Tau
44
RV_stat {
st_dev=42;
st_ino= 293432;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
45
46 # test that renaming a file in another existing file with a link affects the link count
47
48 open_close "/f1.txt" [O_RDONLY;O_CREAT] 0o666
49 Tau
50 RV_none
51
52 rename "f1.txt" "f2.txt"
53 Tau
54 RV_none
55
56 stat "f2.txt"
57 Tau
58
RV_stat {
st_dev=42;
st_ino= 293433;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=1;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
59
60 stat "f1_hl.txt"
61 Tau
62
RV_stat {
st_dev=42;
st_ino= 293432;
st_kind= S_IFREG;
st_perm= 0o644;
st_nlink=2;
st_uid= 0;
st_gid= 0;
st_rdev=0;
st_size= 0;
}
THE SPEC ASSERTS THE STATE SET IS EMPTY
The spec permitted:
  • RV_stat {
    st_dev=2049;
    st_ino= 1;
    st_kind= S_IFREG;
    st_perm= 0o644;
    st_nlink=1;
    st_uid= 0;
    st_gid= 0;
    st_rdev=0;
    st_size= 0;
    }
expected st_nlink 1 but got st_nlink 2
63
64