summaryrefslogtreecommitdiff
path: root/integrationtests/stat_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests/stat_test.go')
-rw-r--r--integrationtests/stat_test.go80
1 files changed, 80 insertions, 0 deletions
diff --git a/integrationtests/stat_test.go b/integrationtests/stat_test.go
new file mode 100644
index 0000000..e38171a
--- /dev/null
+++ b/integrationtests/stat_test.go
@@ -0,0 +1,80 @@
+package integrationtests
+
+import "testing"
+
+func TestStatBasic(t *testing.T) {
+ runScenario(t, "stat-basic", []ExpectedEvent{
+ {
+ PathContains: "statfile.txt",
+ Tracepoint: "enter_newstat",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestStatFstat(t *testing.T) {
+ runScenario(t, "stat-fstat", []ExpectedEvent{
+ {
+ PathContains: "fstatfile.txt",
+ Tracepoint: "enter_newfstat",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestStatLstat(t *testing.T) {
+ runScenario(t, "stat-lstat", []ExpectedEvent{
+ {
+ PathContains: "lstatfile.txt",
+ Tracepoint: "enter_newlstat",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestStatNewfstatat(t *testing.T) {
+ runScenario(t, "stat-newfstatat", []ExpectedEvent{
+ {
+ PathContains: "fstatatfile.txt",
+ Tracepoint: "enter_newfstatat",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestStatStatx(t *testing.T) {
+ runScenario(t, "stat-statx", []ExpectedEvent{
+ {
+ PathContains: "statxfile.txt",
+ Tracepoint: "enter_statx",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestStatAccess(t *testing.T) {
+ runScenario(t, "stat-access", []ExpectedEvent{
+ {
+ PathContains: "accessfile.txt",
+ Tracepoint: "enter_access",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}
+
+func TestStatFaccessat(t *testing.T) {
+ runScenario(t, "stat-faccessat", []ExpectedEvent{
+ {
+ PathContains: "faccessatfile.txt",
+ Tracepoint: "enter_faccessat",
+ Comm: "ioworkload",
+ MinCount: 1,
+ },
+ })
+}