Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2 tests about mount/umount #75

Open
wants to merge 1 commit into
base: sgx-lkl
Choose a base branch
from
Open

Conversation

hukoyu
Copy link
Collaborator

@hukoyu hukoyu commented Aug 20, 2020

Copy link

@shaikshavali1 shaikshavali1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add below config parameters to tst_test test structure initialization in fdatasync03.c file.
.mount_device = 1,
.all_filesystems = 1,
.mntpoint = MNTPOINT,

By enabling above options, test framework will mount the file system at the time of test initialization time.

#define FILE_SIZE_MB 32
#define FILE_SIZE (FILE_SIZE_MB * TST_MB)
#define MODE 0644
#define dev "/dev/vda"
#define dev "/dev/vdb"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required now. Please add below config parameters to tst_test test structure initialization in fdatasync03.c file.
.mount_device = 1,
.all_filesystems = 1,
.mntpoint = MNTPOINT,

By enabling above options, test framework will mount the file system at the time of test initialization time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaikshavali1 can you give more explanation. We are creating test image and mapping to /dev/vdb and /data in config. Why do we need to mount again? Why don't I need to specify /dev/vdb? Why do we need to mount again?

@@ -45,12 +42,10 @@ static void verify_fdatasync(void)
if (TST_RET)
tst_brk(TFAIL | TTERRNO, "fdatasync(fd) failed");

written = tst_dev_bytes_written(dev);
written = tst_dev_bytes_written(dev);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually indentation was wrong before, now it is correct :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaikshavali1 I assume LTP_DEV will have the /dev/vdb in it. But how about tst_dev_bytes_written, what should we pass to it?

@@ -21,13 +21,14 @@
#include "lapi/sync_file_range.h"
#include "check_sync_file_range.h"

#define MNTPOINT "mnt_point"
#define MNTPOINT "/data"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required. Please add below config parameters to tst_test test structure initialization in fdatasync03.c file.
.mount_device = 1,
.all_filesystems = 1,
.mntpoint = MNTPOINT,

By enabling above options, test framework will mount the file system at the time of test initialization time.

#define FNAME1 MNTPOINT"/test1"
#define FNAME2 MNTPOINT"/test2"
#define FNAME3 MNTPOINT"/test3"
#define FILE_SZ_MB 32
#define FILE_SZ (FILE_SZ_MB * TST_MB)
#define MODE 0644
#define dev "/dev/vdb"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required.

@@ -124,10 +125,6 @@ static void setup(void)
static struct tst_test test = {
.tcnt = ARRAY_SIZE(testcases),
.needs_root = 1,
.mount_device = 1,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add below config parameters to tst_test test structure initialization in fdatasync03.c file.
.mount_device = 1,
.all_filesystems = 1,
.mntpoint = MNTPOINT,

By enabling above options, test framework will mount the file system at the time of test initialization time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaikshavali1 we have already /data and /dev/vdb mounted. Why are we mounting again? Do we really need to mount again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Test] Fix LTP tests for sync_file_range02 and fdatasync03
2 participants