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

Add libzzip regression test #7095

Merged
merged 1 commit into from
Apr 8, 2019
Merged

Conversation

martinsmarcelo
Copy link
Contributor

This script fixes poo#49082 - [qam] Regression test zziplib
Create regression test for zziplib:

  • create compressed file(backup of any directory) by zip command
  • use unzip-mem with options -l, -v, -t

Expected result:
Simple scenario for zziplib is created.

Related ticket: https://progress.opensuse.org/issues/49082
Verification run:
SLES 12 SP4 - http://10.161.229.197/tests/261#step/zziplib/1
SLES 12 SP3 - http://10.161.229.197/tests/265#step/zziplib/1
SLES 15 - http://10.161.229.197/tests/264#step/zziplib/1
Opensuse Leap 15 - http://10.161.229.197/tests/262#step/zziplib/1

@czerw
Copy link
Contributor

czerw commented Mar 20, 2019

@martinsmarcelo please do travis fix in original commit

# Use unzip-mem on zip file to get a verbose list archived files (-v)
# Option -v creates a core dump(bsc#1129403), create a soft-failure
my $RETURN_CODE = script_run("unzip-mem -v $filezip | test $? -eq 0");
if (($RETURN_CODE) == "136") {
Copy link
Member

@mimi1vx mimi1vx Mar 27, 2019

Choose a reason for hiding this comment

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

why if (($RETURN_CODE) == "136") ?

== is numerical operator so if is RETURN_CODE number ... if ($RETURN_CODE == 136) else if ($RETURN_CODE eq "136")

btw: how you can get from test $? -eq 0 returncode 136 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, I change code to "eq" , and modify $RETURN_CODE to simplify. Tested and woking fine.
http://10.161.229.197/tests/288#step/zziplib/17
Thank you

record_soft_failure "bsc#1129403 - Option -v creates a core dump";
save_screenshot;
} else {
script_run("unzip-mem -v $filezip");
Copy link
Member

Choose a reason for hiding this comment

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

assert_script_run is here better ..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, changed.

This script fixes poo#49082 - [qam] Regression test zziplib
Create regression test for zziplib:
- create compressed file(backup of any directory) by zip command
- use unzip-mem with options -l, -v, -t

Expected result:
Simple scenario for zziplib is created.

Related ticket: https://progress.opensuse.org/issues/49082
Verification run:
SLES 12 SP4 - http://10.161.229.197/tests/261#step/zziplib/1
SLES 12 SP3 - http://10.161.229.197/tests/265#step/zziplib/1
SLES 15 - http://10.161.229.197/tests/264#step/zziplib/1
Opensuse Leap 15 - http://10.161.229.197/tests/262#step/zziplib/1
@dzedro dzedro merged commit 3ef9222 into os-autoinst:master Apr 8, 2019
@jwbruno
Copy link
Contributor

jwbruno commented Apr 8, 2019

It seems that the tests are having some issues on sle 12 sp1,2 on qam-sle. Would you guys please check?
https://progress.opensuse.org/issues/50153

my $filezip = "files.zip";
select_console "root-console";
# create a tmp dir/files to work
assert_script_run "mkdir /tmp/zip; cp /usr/share/doc/* /tmp/zip -R";
Copy link
Member

Choose a reason for hiding this comment

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

@dzedro @martinsmarcelo Could you guys enable the sdk module here? to avoid: https://bugzilla.suse.com/show_bug.cgi?id=1132766? I guess add_suseconnect_product(get_addon_fullname("sdk)) would do the trick

Copy link
Contributor

Choose a reason for hiding this comment

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

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